Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.2, 6.6.3, 6.7.0
-
-
c821284d9 (dev), e0b536e01 (6.8), 37ae99b2c (6.7), 0156061ce (tqtc/lts-6.5)
Description
The example code will won't show the "richtext" message box on macOS.
import QtQuick import QtQuick.Dialogs import QtQuick.Controls import QtQuick.Layouts Window { width: 640 height: 480 visible: true title: qsTr("Hello World") MessageDialog { id: dialogRichText buttons: MessageDialog.Yes | MessageDialog.No text: "Hello <b>World</b>" } MessageDialog { id: dialogPlainText buttons: MessageDialog.Yes | MessageDialog.No text: "Hello World" } ColumnLayout { Button { text: "Rich Text MessageDialog" onClicked: dialogRichText.open(); } Button { text: "Plain Text MessageDialog" onClicked: dialogPlainText.open(); } } }
Log output:
qt.quick.dialogs: open called qt.quick.dialogs: gHelper attempting to create dialog backend of type 3 with parent window QWindow(0x0) qt.qpa.dialogs: Asked to show Qt::WindowModal dialog with parent Main_QMLTYPE_5(0x600000bf0c30) qt.qpa.dialogs: Message box contains text in rich text format
This is caused by QCocoaMessageDialog::show returning early in this case.
The comments say "// Let's fallback to non-native message box,", but no fallback is triggered.
This is really nasty, especially when the error text could contain user provided input.
Maybe related to QTBUG-104797 or QTBUG-68418.
Attachments
For Gerrit Dashboard: QTBUG-124124 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
582535,6 | Dialogs: Fall back to non-native dialog if native dialog can't be shown | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
582599,2 | Dialogs: Fall back to non-native dialog if native dialog can't be shown | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
582644,2 | Dialogs: Fall back to non-native dialog if native dialog can't be shown | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
582809,3 | Dialogs: Fall back to non-native dialog if native dialog can't be shown | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |