Results 1 to 5 of 5

Thread: Using QScrollArea

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Edmonton, Canada
    Posts
    101
    Thanks
    13
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using QScrollArea

    That sounds promising. Could you please be a little more explicit, though? I don't quite follow your meaning here.

    Thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Using QScrollArea

    Something like this:
    Qt Code:
    1. QWidget* widget = new QWidget;
    2. widget->setLayout(vbox);
    3. scrollarea->setWidget(widget);
    To copy to clipboard, switch view to plain text mode 

    The vbox layout contains all tables and so on and is able to count the needed size and works nicely in a scroll area.. Just test and see how perfectly it works

  3. The following user says thank you to jpn for this useful post:

    Jimmy2775 (2nd March 2006)

  4. #3
    Join Date
    Jan 2006
    Location
    Edmonton, Canada
    Posts
    101
    Thanks
    13
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using QScrollArea

    Oh sweet - thanks jpn. Now this is starting to look the way I'd like.

    A further question...

    I want to set the height of the QTableView to be the height of its contents, but the only way I can see to do this is to loop through all the rows and add each rowHeight. Is there a more efficient way to do this?

Similar Threads

  1. Replies: 1
    Last Post: 13th September 2008, 11:00
  2. Dynamic updates of a QWidget in a QScrollArea
    By plamkata in forum Qt Programming
    Replies: 2
    Last Post: 20th July 2008, 23:45
  3. QScrollArea
    By sabeesh in forum Qt Programming
    Replies: 7
    Last Post: 2nd November 2007, 10:33
  4. QScrollArea and resizing
    By rarefluid in forum Qt Programming
    Replies: 8
    Last Post: 22nd July 2007, 14:18
  5. Replies: 2
    Last Post: 8th October 2006, 20:14

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
  •  
Qt is a trademark of The Qt Company.