View Single Post
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#88
Originally Posted by D-Iivil View Post
I tried to use it but couldn't get it scrolling
I dragged the scrollarea to mainwindow, resized it to fill almost the whole mainwindow and then cut + pasted my elements inside of it, but the damn area won't scroll even the elements goes below the scrollarea. I also tried to scretch the scrollarea to be longer than my mainwindow but still didn't scroll.
I haven't used scrollarea myself never, but according to Qt's manual I think you need to insert an empty widget in the scroll area and your other elements in the widget and then in MainWindow's constructor do this:
Code:
ui->yourScrollArea->setWidget(ui->yourWidget);
EDIT: Seems you need to put the widget outside the scrollarea in designer, otherwise it won't work.
__________________
My Maemo5 projects:
mSpede - Speed testing game | Them Bloody Ducks - 2D duck hunting game | Maetronome - A simple metronome app | CuteMPC - MPD client

Last edited by TNiga; 2010-08-02 at 12:32.