Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
6.8.1
-
None
-
windows10
Description
I have an application (FreeCAD) with a FramelessWindowHint:
FramelessWindow::FramelessWindow(QWidget * parent, Qt::WindowFlags f) : QMainWindow( parent, f )
Trying to maximize the window gives weird behavior:
Start with a non-maximized window.
Try to maximize it (with python or cpp is the same). The window visually maximize. However the QEvent::WindowStateChange is duplicated. So the window is kind-of-restored (but not in size) :
>>> mainWindow.showMaximized()
>>> mainWindow.isMaximized()
False
>>> mainWindow.showMaximized()
>>> mainWindow.isMaximized()
True
The problem is that if you have a button to maximize/restore like so :
void CustomTitleBar::toggleMaximizeRestore() {
if (m_mainWindow->isMaximized())
else
{ m_mainWindow->showMaximized(); }}
Then here what happens if you click it :
- Start normal
- Click 1 : Becomes visually maximized, but is in fact 'restored'
- Click 2 : stays visually maximize, become 'maximized' for real.
- Click 3 : restores correctly.
This was behaving perfectly with Qt 5.15 and fails after updating to Qt 6.8.1