[QtInstallerFramework][macOS] Message boxes ignore mouse clicks when shown over the active installer window (native QMessageBox)
-
I have tried to create bug in the jira but had an error about assignee.
Environment:
- Qt Installer Framework 4.11.0 (from Qt Online Installer), built against Qt 6.x
- MacOS 26.3.1
- Reproduced with a fresh, properly-launched .app bundle (double-click in Finder). No window managers, not over a screen-sharing/VNC session.
Description:
On macOS, QMessageBox-based dialogs shown by the installer do not respond to mouse clicks when they are presented on top of the already-active wizard window. The dialog renders, but mouse clicks on its buttons are ignored; only the default button's Return shortcut works, and the active button cannot be changed with the mouse. This affects built-in message boxes (e.g. the "The directory you selected already exists and contains an installation" warning on the target-directory page) as well as boxes shown from a controller script.
The trigger is the native dialog path introduced in Qt 6.6: with plain text, QMessageBox is rendered as a native NSAlert, and when shown over the already-active installer window it never becomes the key window, so mouse events go to the (modally blocked) wizard underneath. The same message box is clickable when shown before the main window becomes active (e.g. on the very first page callback at startup).Steps to reproduce:
- Use this controller.js:
function Controller() {} Controller.prototype.TargetDirectoryPageCallback = function() { // Plain text -> native NSAlert -> mouse ignored over the active window QMessageBox.question("t.plain", "Test", "Click No with the mouse.", QMessageBox.Yes | QMessageBox.No); // Rich text (<br>) -> Qt widget dialog -> mouse works QMessageBox.question("t.rich", "Test", "Click No with the mouse.<br>", QMessageBox.Yes | QMessageBox.No); };- Build an installer with binarycreator, launch the .app, click Next from the Welcome page so the wizard window is active.
- Try to click "No" with the mouse on the first (plain-text) dialog, then on the second (rich-text) dialog.
Expected:
Both dialogs respond to mouse clicks.
Actual:
The plain-text (native) dialog ignores mouse clicks entirely — only Return on the default button works. The rich-text dialog (forced onto the non-native widget path because rich text disables canBeNativeDialog()) responds to the mouse normally.
Workaround: Forcing the non-native widget path fixes it — either rich text in the message (script side, partial), or QMessageBox::Option::DontUseNativeDialog / Qt::AA_DontUseNativeDialogs (C++ side, full). There is currently no way to control this from config.xml or a controller script for the framework's own message boxes.