How to set a Maximum size for a subwindow in a MDI Area ?
-
setMaximumSize(wmax, hmax) works fine on a simple QMainWindow Widget window (having a layout), but has no effect on a subwindow added with addSubWindow() to a mdi area ? The subwindow can still resized much more then the limits given in setMaximumSize... Tried many combinaison of layout constraints, no effect, also intercepting the resizeEvent of the subwindow & event->ignore() if width || height > wmax, hmax has also no effect...
-
Applying the constraints on QMdiSubWindow instead of the subwindow partly solved my problem but I can't still intercept the maximize button to avoid my subwindow to be maximized on the MdiArea
QMdiSubWindow *sw = mdiArea->addSubWindow(...);
sw->resize(300,200);
sw->setMaximumSize(600,500); //then the subwindow is now limited to 600,500