6#include <QtQuickTemplates2/private/qquickpopup_p_p.h>
7#include <QtQuickTemplates2/private/qquickpopupanchors_p.h>
13Q_LOGGING_CATEGORY(lcQuickPlatformMessageDialog,
"qt.quick.dialogs.quickplatformmessagedialog")
17 qCDebug(lcQuickPlatformMessageDialog)
18 <<
"creating non-native Qt Quick MessageDialog with parent" <<
parent;
26 qmlWarning(
parent) <<
"No QQmlContext for QQuickPlatformMessageDialog; can't create "
27 "non-native MessageDialog implementation";
32 "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/qml/MessageDialog.qml"));
35 if (!messageDialogComponent.
isReady()) {
36 qmlWarning(
parent) <<
"Failed to load non-native MessageBox implementation:\n"
41 m_dialog = qobject_cast<QQuickMessageDialogImpl *>(messageDialogComponent.
create());
44 qmlWarning(
parent) <<
"Failed to create an instance of the non-native MessageBox:\n"
49 m_dialog->setParent(
this);
60 <<
"exec() is not supported for the Qt Quick MessageDialog fallback";
66 qCDebug(lcQuickPlatformMessageDialog)
67 <<
"show called with flags" <<
flags <<
"modality" << modality <<
"parent" <<
parent;
74 auto quickWindow = qobject_cast<QQuickWindow *>(
parent);
77 <<
") of non-native dialog is not a QQuickWindow";
81 m_dialog->resetParentItem();
84 popupPrivate->getAnchors()->setCenterIn(m_dialog->parentItem());
111#include "moc_qquickplatformmessagedialog_p.cpp"
QString windowTitle() const
QObject * parent() const
Returns a pointer to the parent object.
void setParent(QObject *parent)
Makes the object a child of parent.
The QQmlComponent class encapsulates a QML component definition.
bool isReady() const
Returns true if status() == QQmlComponent::Ready.
Q_INVOKABLE QString errorString() const
\qmlmethod string Component::errorString()
virtual QObject * create(QQmlContext *context=nullptr)
Create an object instance from this component, within the specified context.
QQmlEngine * engine() const
Return the context's QQmlEngine, or \nullptr if the context has no QQmlEngine or the QQmlEngine was d...
void setTitle(const QString &title)
void setOptions(const QSharedPointer< QMessageDialogOptions > &options)
void buttonClicked(QPlatformDialogHelper::StandardButton button, QPlatformDialogHelper::ButtonRole role)
Combined button and popup list for selecting options.
#define Q_LOGGING_CATEGORY(name,...)
#define qCWarning(category,...)
#define qCDebug(category,...)
QQmlContext * qmlContext(const QObject *obj)
Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
#define QStringLiteral(str)
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
file setParent(multiPart)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent