This is default behavior of QMainWindow. You dont have to take care for that. Play with size policy of central widget. And look at this.
This is default behavior of QMainWindow. You dont have to take care for that. Play with size policy of central widget. And look at this.
Hi, what happens to me is that the MdiArea scales to take up all available space, but my SubWindows stay the same size, they are just moved, not scaled.
To make it clearer:
if I have a DockWidget on the left and a SubWindow with the maximum width (ergo width() == mdiArea.width()), and I hide the DockWidget, I want the width of my SubWindow to grow to its old width + the width of the DockWidget. The height should scale by the same factor.
Ginsengelf
edit: ah, the dock widgets example seems to do what I want, I'll have a look.
edit2: this automatic resize seems to work only if SubWindows are tile()d , if I shrink them to a custom size, they just stay the same![]()
Last edited by Ginsengelf; 6th August 2009 at 15:17. Reason: new insight
This is true, they will not change size, until you tell them to do so.
Try re setting this.
Qt Code:
QMdiArea::DontMaximizeSubWindowOnActivationTo copy to clipboard, switch view to plain text mode
Bookmarks