Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, January 2008
QToolBox and scrolling/sizing problem


Message 1 in thread

Hello There,

I was very happy finding the QToolBox class which looked very nice to me at
the first look but now I have a couple of problems with it.
What I did was: I created a new QMainWindow, added a QWidget as the central
widget and a grid layout into it. Then there is a QDockWidget at the top and
a QToolBox on the left hand side. I have flexible amount of content to be
added (buttons) to QWidget items in the QToolBox. It looks it is possible to
add items which have items of QToolBox parents as well as it is possible to
add layouts with the same parents. Either way I would like to achieve that
the buttons I add are always reachable. For that scrolling is needed - I
wonder why it is not available in Qt Designer... The other thing what I
would like to achieve that the area where the buttons are visible is always
goes until the next visible item of the QToolBox meaning that if the
QMainWindow is resized then the scrollable area is resize too.

I tried a few things with QScrollArea but it did not work out for me at all.

Has someone did it earlier having some example code in hand?

Thanks,
Sandor