PDA

View Full Version : MdiArea in centralWidget -> many mdiSubwindows resize MainWindow



HappyCoder
3rd March 2016, 09:56
Hello,

i have in my centralWidget a QMdiArea. When i open many files (30) i got in
Window mode many windows, thats ok.
When i now switch from "cascade" to "tile" the mainwindow resizes and is
much bigger than my screen.

How can i prevent a resize of the mainwindow if i activate "tile" view of
many windows in a mdiAdea?

i tried this, but didn't work:


void MainWindow::resizeEvent(QResizeEvent *event)
{
ui->centralWidget->setMaximumHeight(geometry().height());
ui->centralWidget->setMaximumWidth(geometry().width());
}


Thx

Ginsengelf
3rd March 2016, 10:44
Hi, do you have a minimum size for your MDI subwindows?

Ginsengelf

HappyCoder
3rd March 2016, 11:31
No. The widget "ui_graph_window" will be used in every mdiSubWindow.
The mdiSubWindow has no miniminSize and the "ui_graph_window.ui" also.