1 Attachment(s)
QWidget state set to maximized but not expanded to full monitor area
My widget after WindowState set to maximized and called show(), doesn't expand to cover the entire monitor. Instead, expands to only a portion of the screen. Window buttons are showing minimize, restore down & close, which is perfectly fine. Please find the image for idea.Attachment 12235
I have a scenario like this.
TopWindow is a QWidget. MainWindow is a QMainWindow.
MainWindow is added to TopWindow using QVBoxLayout. Note that MainWindow is the only widget added to TopWindow. Now when I set
Code:
TopWindow->setWindowState( TopWindow->windowState() | Qt::WindowMaximized );
TopWindow->show();
I checked the TopWindow state by printing debug statements. After creating, it doesn't have any state. So it returns QFlags<Qt::WindowState>(WindowNoState)
After setting, the state to TopWindow->setWindowState( TopWindow->windowState() | Qt::WindowMaximized );
And executing TopWindow->show(), the debug statement is printing QFlags<Qt::WindowState>(WindowMaximized) which is correct.
I have no clue on why the TopWindow isn't expanding to full screen. Please help.
Re: QWidget state set to maximized but not expanded to full monitor area
Can you post more of your GUI builder code, with visible initialization and connection between 'TopWindow' and 'MainWindow'
Re: QWidget state set to maximized but not expanded to full monitor area
Thanks for the reply, RafalNiewinski
I guess my issue replicates this bug - https://bugreports.qt.io/browse/QTBUG-16252
Right now, I'm looking for a work around to bypass this issue.