6#include <QtCore/qloggingcategory.h>
7#include <QtGui/qwindow.h>
8#include <QtQml/qqmlcontext.h>
9#include <QtQml/qqmlinfo.h>
10#include <QtQuick/qquickwindow.h>
11#include <QtQuickTemplates2/private/qquickdialog_p.h>
12#include <QtQuickTemplates2/private/qquickpopup_p_p.h>
13#include <QtQuickTemplates2/private/qquickpopupanchors_p.h>
19Q_LOGGING_CATEGORY(lcQuickPlatformFontDialog,
"qt.quick.dialogs.quickplatformfontdialog")
32 qCDebug(lcQuickPlatformFontDialog)
33 <<
"creating non-native Qt Quick FontDialog with parent" <<
parent;
41 qmlWarning(
parent) <<
"No QQmlContext for QQuickPlatformFontDialog; can't create "
42 "non-native FontDialog implementation";
47 "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/qml/FontDialog.qml"));
50 if (!fontDialogComponent.
isReady()) {
51 qmlWarning(
parent) <<
"Failed to load non-native FontDialog implementation:\n"
56 m_dialog = qobject_cast<QQuickFontDialogImpl *>(fontDialogComponent.
create());
59 qmlWarning(
parent) <<
"Failed to create an instance of the non-native FontDialog:\n"
64 m_dialog->setParent(
this);
95 <<
"exec() is not supported for the Qt Quick FontDialog fallback";
101 qCDebug(lcQuickPlatformFontDialog)
102 <<
"show called with flags" <<
flags <<
"modality" << modality <<
"parent" <<
parent;
110 auto quickWindow = qobject_cast<QQuickWindow *>(
parent);
113 <<
") of non-native dialog is not a QQuickWindow";
117 m_dialog->resetParentItem();
120 popupPrivate->getAnchors()->setCenterIn(m_dialog->parentItem());
145#include "moc_qquickplatformfontdialog_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)
QSharedPointer< QFontDialogOptions > options() const
void currentFontChanged(const QFont &font)
void setCurrentFont(const QFont &font, bool selectInListViews=false)
void setOptions(const QSharedPointer< QFontDialogOptions > &options)
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