Solved Incorrect calls of enterEvent for QSubWindow on Win10 withmultiple desktops
-
Hello.
I faced with one problem with Windows 10 and multiple desktops. On desktop A i have QSubWindow, it has overrided method enterEvent . I switched to desktop B and i did not see QSubWindow, because it is on sesktop A. But when i move mouse on area, where QSubWindow was located on desktop A, i get enterEvent call. Is there a method to know, is my QSubWindow on active desktop or not. Or how can i disable unneeded calls on enterEvent.
-
Hi,
Looks like an interesting bug. You should check the bug report system to see if it's something known. If not please consider opening a new report providing a minimal compilable example that shows that behavior and instructions to reproduce your multiple desktop setup.
-
@SGaist Looks like it is little another bug. if i set QSubWindow to QWidget, i see this QWidget on all Windows 10 desktops. But if i set QWindow flag, i see it only on one desktop. By this reason i get enterEvent for all desktops.
-
Which version of Qt are you using ?
-
@SGaist 5.5.1, also i created bug in bug tracker: https://bugreports.qt.io/browse/QTBUG-53789
-
Thanks for the report !
Can you test against the latest version of Qt ? It should be 5.7 RC
-
@SGaist I will try on Monday.
-
@SGaist I have the same problem with 5.7 RC.
-
Then you should update the bug report with the new information.
-
I found solution for my problem. First of all i should use Qt::Tool (non Qt::SubWindow).
Second i need to create window with owner to fix it. I was able to do it, pass parent parameter and Qt::Tool flag to base QWidget constructor. When i passed parent and flag using methods setParent and setWidnowFlags after constructor, they set parent to Window (non owner). As the result this method did not work.
This question helps me to find my mistake: http://stackoverflow.com/questions/37748812/remove-window-from-taskbar-on-windows-10