32 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
33 Q_PROPERTY(QString informativeText READ informativeText WRITE setInformativeText NOTIFY informativeTextChanged FINAL)
34 Q_PROPERTY(QString detailedText READ detailedText WRITE setDetailedText NOTIFY detailedTextChanged FINAL)
35 Q_PROPERTY(QPlatformDialogHelper::StandardButtons buttons READ buttons WRITE setButtons NOTIFY buttonsChanged FINAL)
36 Q_PROPERTY(QQuickText::TextFormat textFormat READ textFormat WRITE setTextFormat RESET resetTextFormat NOTIFY textFormatChanged REVISION(6, 13))
37 QML_EXTENDED_NAMESPACE(QPlatformDialogHelper)
38 QML_NAMED_ELEMENT(MessageDialog)
39 QML_ADDED_IN_VERSION(6, 3)
42 explicit QQuickMessageDialog(QObject *parent =
nullptr);
45 void setText(
const QString &text);
47 QString informativeText()
const;
48 void setInformativeText(
const QString &text);
50 QString detailedText()
const;
51 void setDetailedText(
const QString &text);
53 QPlatformDialogHelper::StandardButtons buttons()
const;
54 void setButtons(QPlatformDialogHelper::StandardButtons buttons);
56 QQuickText::TextFormat textFormat()
const;
57 void setTextFormat(QQuickText::TextFormat textFormat);
58 void resetTextFormat();
62 void informativeTextChanged();
63 void detailedTextChanged();
64 void buttonsChanged();
65 Q_REVISION(6, 13)
void textFormatChanged();
67 void buttonClicked(QPlatformDialogHelper::StandardButton button,
68 QPlatformDialogHelper::ButtonRole role);
71 void handleClick(QPlatformDialogHelper::StandardButton button,
72 QPlatformDialogHelper::ButtonRole role);
75 void onCreate(QPlatformDialogHelper *dialog) override;
76 void onShow(QPlatformDialogHelper *dialog) override;
77 int dialogCode()
const override;
80 QSharedPointer<QMessageDialogOptions> m_options;
81 QPlatformDialogHelper::ButtonRole m_roleOfLastButtonPressed = QPlatformDialogHelper::NoRole;
82 std::optional<QQuickText::TextFormat> m_textFormat;
83 bool m_textFormatWarningDisplayed =
false;