KDeclarative
qmlobject.cpp
100 (error.line() > 0 ? QString(QString::number(error.line()) + QLatin1String(": ")) : QLatin1String("")) + error.description() + QLatin1Char('\n');
115 QObject::connect(component, &QQmlComponent::statusChanged, q, &QmlObject::statusChanged, Qt::QueuedConnection);
154 QmlObject::QmlObject(QQmlEngine *engine, QQmlContext *rootContext, QmlObject *obj, QObject *parent)
161 QmlObject::QmlObject(std::shared_ptr<QQmlEngine> engine, QQmlContext *rootContext, QObject *parent)
226 d->package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("KPackage/GenericQML"));
261 qWarning() << "Trying to use rootObject before initialization is completed, whilst using setInitializationDelayed. Forcing completion";
336 QObject *QmlObject::createObjectFromSource(const QUrl &source, QQmlContext *context, const QVariantHash &initialProperties)
344 QObject *QmlObject::createObjectFromComponent(QQmlComponent *component, QQmlContext *context, const QVariantHash &initialProperties)
Loading
void finished()
Emitted when the parsing and execution of the QML file is terminated.
bool isReady() const const
QString number(int n, int base)
Package loadPackage(const QString &packageFormat, const QString &packagePath=QString())
QVariant fromValue(const T &value)
void setTranslationDomain(const QString &translationDomain)
Call this method before calling setupBindings to install a translation domain for all i18n global fun...
Definition: qmlobject.cpp:202
Q_EMITQ_EMIT
Status
singleShot
void completeInitialization(const QVariantHash &initialProperties=QVariantHash())
Finishes the process of initialization.
Definition: qmlobject.cpp:304
virtual QObject * create(QQmlContext *context)
QObject * createObjectFromComponent(QQmlComponent *component, QQmlContext *context=nullptr, const QVariantHash &initialProperties=QVariantHash())
Creates and returns an object based on the provided QQmlComponent with the same QQmlEngine and the sa...
Definition: qmlobject.cpp:344
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setPackage(const KPackage::Package &package)
Sets a package, then loads the mainscript file for that package.
Definition: qmlobject.cpp:231
void setSource(const QUrl &source)
Sets the path of the QML file to parse and execute.
Definition: qmlobject.cpp:212
An object that instantiates an entire QML context, with its own declarative engine.
Definition: qmlobject.h:41
void setInitializationDelayed(const bool delay)
Sets whether the execution of the QML file has to be delayed later in the event loop.
Definition: qmlobject.cpp:243
bool isEmpty() const const
static PackageLoader * self()
void loadUrl(const QUrl &url)
void timeout()
QUrl fromLocalFile(const QString &localFile)
QueuedConnection
void loadPackage(const QString &packageName)
Load the package called packageName, then loads the mainscript file for that package.
Definition: qmlobject.cpp:224
QQmlComponent * mainComponent() const
Definition: qmlobject.cpp:267
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
static void setupEngine(QQmlEngine *engine)
Setup a QML engine for use with any KDeclarative object.
Definition: kdeclarative.cpp:97
QString filePath(const QByteArray &key, const QString &filename=QString()) const
void setParent(QObject *parent)
bool isError() const const
bool isInitializationDelayed() const
Definition: qmlobject.cpp:248
void statusChanged(QQmlComponent::Status status)
QList< QQmlError > errors() const const
QObject * createObjectFromSource(const QUrl &source, QQmlContext *context=nullptr, const QVariantHash &initialProperties=QVariantHash())
Creates and returns an object based on the provided url to a Qml file with the same QQmlEngine and th...
Definition: qmlobject.cpp:336
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Dec 1 2023 04:03:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Dec 1 2023 04:03:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.