skizzik
12th January 2011, 08:17
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:
QGroupBox *b = new QGroupBox(mainWindow->scrollArea);
b->resize(100,600);
The box show up in the scrollArea, in the top left corner.
Thanks!
To create an object in the scrollArea, I simply write:
QGroupBox *b = new QGroupBox(mainWindow->scrollArea);
b->resize(100,600);
The box show up in the scrollArea, in the top left corner.
Thanks!