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.maximized.JPG
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
Qt Code:
TopWindow->setWindowState( TopWindow->windowState() | Qt::WindowMaximized ); TopWindow->show();To copy to clipboard, switch view to plain text mode
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.
Bookmarks