spraff
26th January 2009, 11:19
Hi. At the moment I have this in a QMainWindow subclass constructor:
thing = new QToolBar(name,this);
addToolBar (Qt::LeftToolBarArea, thing)
// populate thing...
Which works fine.
If I resize the main window, the centralWidget is smaller than that size becuase
the toolbar takes up room. Ideally the resize method would set the centralWidget's size and grow the QMainWindow to fit the toolbars. (If I call resize on the centralWidget, the QMainWindow doesn't seem to respond.)
Another acceptable solution would be to create the QToolBar to be initially floating, but I can't see how. Omitting the addToolBar call simply means that it has no layout and appears squashed int the QMainWindow's space, and there aren't any QToolBar methods I can see that accomplish this.
Can you see how to solve either of these niggles?
Thanks.
thing = new QToolBar(name,this);
addToolBar (Qt::LeftToolBarArea, thing)
// populate thing...
Which works fine.
If I resize the main window, the centralWidget is smaller than that size becuase
the toolbar takes up room. Ideally the resize method would set the centralWidget's size and grow the QMainWindow to fit the toolbars. (If I call resize on the centralWidget, the QMainWindow doesn't seem to respond.)
Another acceptable solution would be to create the QToolBar to be initially floating, but I can't see how. Omitting the addToolBar call simply means that it has no layout and appears squashed int the QMainWindow's space, and there aren't any QToolBar methods I can see that accomplish this.
Can you see how to solve either of these niggles?
Thanks.