pyqt scrollview layout

Discussion in 'Python' started by Felix Steffenhagen, Jul 21, 2006.

  1. Hello,

    I have a problem with updating contents in a qscrollview.
    I've implementented two widgets (PremiseInput and PremiseList).
    You can find the source code under
    http://www.informatik.uni-freiburg.de/~steffenh/premiseinput.{html|py} and
    http://www.informatik.uni-freiburg.de/~steffenh/premiselist.{html|py}

    The PremiseInput is a widget containing two QLineEdit's and a QComboBox.
    This widget should be showed in the PremiseList widget, where I want
    the functionality to dynamically add new PremiseInputs and the widths
    of them should be adjusted to the width of the QScrollView, contained
    in the PremiseList.
    And there is my problem.

    The PremiseInput has a sizeHint of 333. When I show the standard PremiseList,
    the viewport of the scrollview has this size. But when I resize the PremiseList
    widget to a lower or higher width and add a new PremiseInput, the size is
    adjusted to the sizeHint and I'm not able to resize the QScrollView content
    which is too small for larger window sizes and to high for smaller ones.

    My resizeEvent method works, so that widget resizes also resize the QScrollView
    and its content, but when I want to add the same functionality to the
    addPremise() method, nothing happens.

    Does anyone know where the problem lies and perhaps has a solution for me?

    regards,
    Felix
     
    Felix Steffenhagen, Jul 21, 2006
    #1
    1. Advertising

  2. Felix Steffenhagen wrote:

    > I have a problem with updating contents in a qscrollview.
    > I've implementented two widgets (PremiseInput and PremiseList).
    > You can find the source code under
    > http://www.informatik.uni-freiburg.de/~steffenh/premiseinput.{html|py} and
    > http://www.informatik.uni-freiburg.de/~steffenh/premiselist.{html|py}


    You should ask on the PyQt mailing list - you're much more likely to get an
    answer.

    Jeremy

    --
    Jeremy Sanders
    http://www.jeremysanders.net/
     
    Jeremy Sanders, Jul 21, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick Spiewak
    Replies:
    3
    Views:
    3,178
    Rick Spiewak
    Aug 26, 2003
  2. Replies:
    1
    Views:
    604
    John Timney \(MVP\)
    Jun 19, 2006
  3. ulysses
    Replies:
    4
    Views:
    786
    Werner Schiendl
    Oct 22, 2003
  4. Volker Lenhardt
    Replies:
    5
    Views:
    3,403
    Volker Lenhardt
    Nov 19, 2005
  5. Replies:
    0
    Views:
    302
Loading...

Share This Page