Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickmessagedialog.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
7
12
102{
103}
104
113{
114 return m_options->text();
115}
116
118{
119 if (m_options->text() == text)
120 return;
121
122 m_options->setText(text);
123
125}
126
137{
138 return m_options->informativeText();
139}
140
142{
143 if (m_options->informativeText() == text)
144 return;
145
146 m_options->setInformativeText(text);
147
149}
150
159{
160 return m_options->detailedText();
161}
162
164{
165 if (m_options->detailedText() == text)
166 return;
167
168 m_options->setDetailedText(text);
169
171}
172
203QPlatformDialogHelper::StandardButtons QQuickMessageDialog::buttons() const
204{
205 return m_options->standardButtons();
206}
207
208void QQuickMessageDialog::setButtons(QPlatformDialogHelper::StandardButtons buttons)
209{
210 if (m_options->standardButtons() == buttons)
211 return;
212
213 m_options->setStandardButtons(buttons);
214
216}
217
218void QQuickMessageDialog::handleClick(QPlatformDialogHelper::StandardButton button,
220{
222}
223
225{
226 if (QPlatformMessageDialogHelper *messageDialog =
227 qobject_cast<QPlatformMessageDialogHelper *>(dialog)) {
229 &QQuickMessageDialog::handleClick);
230 messageDialog->setOptions(m_options);
231 }
232}
233
235{
236 m_options->setWindowTitle(title());
237
238 if (QPlatformMessageDialogHelper *messageDialog =
239 qobject_cast<QPlatformMessageDialogHelper *>(dialog))
240 messageDialog->setOptions(m_options); // setOptions only assigns a member and isn't virtual
241}
242
244
245#include "moc_qquickmessagedialog_p.cpp"
void setWindowTitle(const QString &)
void setInformativeText(const QString &text)
void setDetailedText(const QString &text)
void setText(const QString &text)
void setStandardButtons(QPlatformDialogHelper::StandardButtons buttons)
QPlatformDialogHelper::StandardButtons standardButtons() const
\inmodule QtCore
Definition qobject.h:90
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2823
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
The QPlatformMessageDialogHelper class allows for platform-specific customization of Message dialogs.
void clicked(QPlatformDialogHelper::StandardButton button, QPlatformDialogHelper::ButtonRole role)
void setButtons(QPlatformDialogHelper::StandardButtons buttons)
void setDetailedText(const QString &text)
QPlatformDialogHelper::StandardButtons buttons
QQuickMessageDialog(QObject *parent=nullptr)
A message dialog.
void onShow(QPlatformDialogHelper *dialog) override
void setInformativeText(const QString &text)
void informativeTextChanged()
void buttonClicked(QPlatformDialogHelper::StandardButton button, QPlatformDialogHelper::ButtonRole role)
void setText(const QString &text)
void onCreate(QPlatformDialogHelper *dialog) override
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
QString text
QPushButton * button
[2]
Combined button and popup list for selecting options.
SharedPointerFileDialogOptions m_options
QQuickDialogType
#define emit
QFileDialog dialog(this)
[1]
view create()
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent