Results 1 to 7 of 7

Thread: Q Scroll Area that scrolls??

  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Q Scroll Area that scrolls??

    1) How can I have the Scroll Area to scroll? I've added a lot of things inside it (and most of the items are hidden, and I suppose the scroll bar should appear then so we can see these hidden items) and after running the program the Scroll Bar does not appear so I can see the "hidden" items...

    The scroll Bar does not appear, even if I check the always on option of scroll bar, I cannot scroll...

  2. #2
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    29
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Q Scroll Area that scrolls??

    I assume you have a layout inside the scroll area? If you don't it might not be recognising that the widgets are too big ...

  3. #3
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Q Scroll Area that scrolls??

    What do you mean layout?
    I have a big Scroll area. I place there some objects. Then I resize the scroll area to its physical size but when I run the program I cannot scroll down to see the things I placed there during the time I hadn't resized the srcoll Area

  4. #4
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    29
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Q Scroll Area that scrolls??

    Sorry - the scroll area doesn't actually have a layout, the widget inside it does. Are you using Designer or coding manually?

  5. #5
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Q Scroll Area that scrolls??

    I am using the Desinger

  6. #6
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    29
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Q Scroll Area that scrolls??

    Ah. You might need to have a layout on the scroll area for it to work.

    First try going to the Object Inspector and expanding the qscrollarea object - there should be a single entry which is a qwidget. Click on the QWidget and make sure its size (or if you can't edit the size, then its minimum size) is larger than the scroll area dimensions.

    If that doesn't work you will have to use a layout. Right-click on an empty section of the scroll area and choose Layout>Lay Out In (whatever you want). It probably won't look exactly how you want at first, but using layouts and sub-layouts is often the best way to get a UI looking nice (Look in the documentation at the Layouts tutorial if you're not sure what I'm talking about )

    See if that works.

    Edit: And if you say Always Show Scrollbars does it? I could be on the wrong track here ...

  7. #7
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Q Scroll Area that scrolls??

    The always show scrollbars shows the scroll bars but I cannot scroll down to the other objects I've placed..
    I'll have a try later on your suggestions and I'll let you know!

Similar Threads

  1. Replies: 10
    Last Post: 2nd August 2010, 15:07
  2. Scroll Area problem
    By Lodhart in forum Qt Programming
    Replies: 0
    Last Post: 10th October 2009, 14:03
  3. Growing the contents of a scroll area.
    By spraff in forum Qt Programming
    Replies: 1
    Last Post: 2nd July 2009, 16:20
  4. scroll area like QGraphicsItem
    By Gopala Krishna in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2008, 12:28
  5. abstract scroll area
    By moowy in forum Qt Programming
    Replies: 2
    Last Post: 2nd October 2006, 10: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.