Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.5, 6.6.2
-
None
-
-
641e5cb4b (6.6), e9838d715 (tqtc/lts-6.5)
Description
In Qt 6.6.2, the MessageDialog accepted signal isn’t emitted for the Ok button:
MessageDialog { text: "Really?" buttons: MessageDialog.Ok | MessageDialog.Cancel onAccepted: console.log("Accepted") onRejected: console.log("Rejected") onButtonClicked: (button, role) => { console.log("Button", button, "Role", role); } }
Using Universal style and the QML dialog implementation.
Clicking the Ok button prints
qml: Button 1024 Role 0 qml: Rejected
Button 1024 is OkButton and 0 is AcceptedRole, so the correct button is detected but the dialog isn’t accepted.
It feels like the close() call that was added causes the dialog to be rejected? https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=b00798df9d842570524550b6780a1debc4fe5387
This worked in Qt 6.6.1