Resize subwindows based on mdiArea window size
-
I have an MdiArea mainDisplay inside which i have defined two subwindow. However, I want the subwindows to resize whenever my mainwindow is resized. These are all embedded inside my mainwindow's central widget. i want the contents to resize whenever my mainwindow is resized
@mainDisplay= new QMdiArea;//main menu mdi area
subwindow1= new QMdiSubWindow;//screen contains pattern catalogue
subwindow1->setWidget(scrollregion);
subwindow1->setMinimumSize(250,700);
mainDisplay->addSubWindow(subwindow1);
subwindow3= new QMdiSubWindow;//screen containing the texture
subwindow3->setMinimumSize(1100,700);
subwindow3->setGeometry(250,0,1000,700);
mainDisplay->addSubWindow(subwindow1);
mainDisplay->addSubWindow(subwindow3);
subwindow3->hide();
setCentralWidget(mainDisplay);@ -
Okay, so I need to to get the size value on resize event ans set the geometry accordingly. Thanks. I was thinking if there was a more direct way?