Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.3
-
None
-
Windows 11
Description
When a main window is maximized and then QMainWindow::hide() is called and remote desktop is reconnected, the window gets displayed in a non working state. Basically the native window is shown but the Qt window is still hidden. Calling show() fixes it. Using the following trivial PyQt6 script to reproduce:
from PyQt6.QtWidgets import QMainWindow, QApplication, QLabel, QSystemTrayIcon, QStyle from PyQt6.QtCore import QTimerapp = QApplication([])m = QMainWindow() m.setCentralWidget(QLabel('hello')) ic = QSystemTrayIcon(m.style().standardIcon(QStyle.StandardPixmap.SP_MessageBoxWarning), m) ic.show() ic.activated.connect(m.show) m.showMaximized() QTimer.singleShot(1000, m.hide) app.exec()
Do the following steps:
1. Connect to a windows (11 maybe 10 too not tested) system using remote desktop
2. Run this script and wait one second for the window to be hidden
3. Disconnect from the windows system
4. Reconnect to the windows system
5. Observe that the previously hidden window is now visible and blank/non functioning
6. Click the tray icon for the application
7. The window is now functioning again
It is necessary for the window to be in maximized state for this bug to trigger.
This is a regression in Qt 6. Not sure which subversion of 6 exactly.