Results 1 to 11 of 11

Thread: QT Designer Scroll Area not working as expected.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Join Date
    Jul 2010
    Location
    London
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT Designer Scroll Area not working as expected.

    That's right, this is the same behaviour like the preview in QtDesigner, but this is just loading the UI file without any context. For my application I need to compile the UI file to .py. Anyway, getting the scrollbars is no problem anymore, thanks to the pyqt docs:
    http://www.riverbankcomputing.co.uk/...crollarea.html

    ... If the widget exceeds the size of the frame, the view can provide scroll bars so that the entire area of the child widget can be viewed. The child widget must be specified with setWidget().

    So I did that and scrollbars show up, but the contents of that scrollArea now behave like they're disabled. In this case I have a scrollLayout that holds a frameLayout containing some groupBoxes containing checkbox widgets, just like this

    Qt Code:
    1. scrollArea
    2. |
    3. |_frameLayout
    4. |
    5. |_groupBox1
    6. | |
    7. | |_checkBox1
    8. | |_checkBox2
    9. |
    10. |_groupBox1
    11. |
    12. |_checkBox3
    13. |_checkBox4
    To copy to clipboard, switch view to plain text mode 
    When attaching the frameLayout to the scrollLayout via setWidget() the I cannot toggle the checkboxes anymore. If I skip setWidget() all works fine, but no scrollbars show up.

    Any idea, what's going on here?

    Many thanks
    Robin
    Last edited by robomat; 2nd August 2010 at 12:27.

Similar Threads

  1. Scroll Area problem
    By Lodhart in forum Qt Programming
    Replies: 0
    Last Post: 10th October 2009, 13:03
  2. QTableView not working as expected.
    By junxuan in forum Qt Programming
    Replies: 7
    Last Post: 30th July 2009, 08:17
  3. Growing the contents of a scroll area.
    By spraff in forum Qt Programming
    Replies: 1
    Last Post: 2nd July 2009, 15:20
  4. scroll area like QGraphicsItem
    By Gopala Krishna in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2008, 11:28
  5. abstract scroll area
    By moowy in forum Qt Programming
    Replies: 2
    Last Post: 2nd October 2006, 09:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.