Results 1 to 2 of 2

Thread: scrollArea

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default scrollArea

    I have created a scrollArea in the designer in Qt Creator. Its scrollAreaWidgetContents have a grid-layout. If I put in an object in the area in the designer, the scrollbar works fine. But if I create an object later in the code, the scrollbar doesn't work and the object is simply cut if the window is too small. What to do?

    To create an object in the scrollArea, I simply write:

    Qt Code:
    1. QGroupBox *b = new QGroupBox(mainWindow->scrollArea);
    2. b->resize(100,600);
    To copy to clipboard, switch view to plain text mode 

    The box show up in the scrollArea, in the top left corner.

    Thanks!
    Last edited by Lykurg; 12th January 2011 at 13:03. Reason: missing [code] tags

Similar Threads

  1. ItemViews in ScrollArea
    By SElsner in forum Newbie
    Replies: 3
    Last Post: 4th June 2010, 23:59
  2. paint in the viewport of a scrollarea
    By franco.amato in forum Qt Programming
    Replies: 14
    Last Post: 30th March 2010, 03:22
  3. Autoscroll in ScrollArea
    By BalaQT in forum Qt Programming
    Replies: 2
    Last Post: 26th October 2009, 05:37
  4. scrollArea not updating
    By user in forum Qt Programming
    Replies: 9
    Last Post: 3rd October 2007, 08:17
  5. QTreeWidget without the ScrollArea?
    By Paalrammer in forum Newbie
    Replies: 5
    Last Post: 13th February 2007, 19:06

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.