Ok, this worked:
showFullScreen();
setGeometry(qApp->desktop()->availableGeometry());
updateGeometry();
showFullScreen();
setGeometry(qApp->desktop()->availableGeometry());
updateGeometry();
To copy to clipboard, switch view to plain text mode
However, when you right-click on the application button in the Windows taskbar it doesn't have the "Restore" option highlighted... Is there any way to manually enable those options?
Also, it would be a lot easier if I blocked the call for maximizing the application right when the application receives it and before any resize takes place; but for some reason I can't ignore the event. Here's the code I have in place that catches the maximize attempt:
bool MyMainWindow
::event(QEvent* e
) {
if(e
->type
() == QEvent::WindowStateChange && windowState
() == Qt
::WindowMaximized) {
// Manually resize the GUI using the above method.
e->ignore();
return false;
}
else
}
bool MyMainWindow::event(QEvent* e)
{
if(e->type() == QEvent::WindowStateChange && windowState() == Qt::WindowMaximized)
{
// Manually resize the GUI using the above method.
e->ignore();
return false;
}
else
return QWidget::event(e);
}
To copy to clipboard, switch view to plain text mode
Even though I specify that the event should be ignored, the window still tries to maximize which causes a brief moment of window resizing up, then down, then back up to full-screen. Is there something else I need to do to ignore the event?
Thanks!
Bookmarks