Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.6.2
-
None
-
9d696af6cd45ee95c155829999b8184229f9bc72
Description
A QtQuick.Window with type Qt.dialog will show a '?' button on Windows.
Clicking on it will change the mouse cursor. However, since handling of 'What's This' is not implemented, the mouse cursor will never change back.
Problem analysis:
- '?' button because, in the Windows platform plugin, Qt::WindowContextHelpButtonHint is set for top-level windows with flag Qt::Dialog.
- If the user clicks the '?' button a EnterWhatsThisMode is created (see QWindowSystemInterface::handleEnterWhatsThisEvent)
- QApplication::event handles QEvent::EnterWhatsThisMode by calling QWhatsThis::enterWhatsThisMode();
- QWhatsThis only forwards events to top level QWidgets (QApplication::topLevelWidgets()). So even if QWindow / QQuickWindow would add event handlers for QEvent::QueryWhatsThis, QEvent:WhatsThis it would not be delivered
Workaround:
Explicitly disable Qt::WindowContextHelpButtonHint for QtQuick.Window objects
Window {
flags: Qt.Dialog
Component.onCompleted: {
flags = flags & ~Qt.WindowContextHelpButtonHint
}
// ...
}