Struct qmetaobject::qtdeclarative::QmlEngine[][src]

#[repr(C)]
pub struct QmlEngine { /* fields omitted */ }
Expand description

Wrap a Qt Application and a QmlEngine

Note that since there can only be one Application in the process, creating two QmlEngine at the same time is not allowed. Doing that will panic.

Implementations

Create a new QmlEngine

Loads a file as a qml file (See QQmlApplicationEngine::load(const QString & filePath))

Loads the root QML file located at url (See QQmlApplicationEngine::load(const QUrl &url))

Loads qml data (See QQmlApplicationEngine::loadData)

Loads qml data with url as base url component (See QQmlApplicationEngine::loadData)

Launches the application

Closes the application

Sets a property for this QML context (calls QQmlEngine::rootContext()->setContextProperty)

Sets an object for this QML context (calls QQmlEngine::rootContext()->setContextObject)

Sets a property for this QML context (calls QQmlEngine::rootContext()->setContextProperty)

Give a QObject to the engine by wrapping it in a QJSValue

This will create the C++ object. Panic if the C++ object was already created.

Adds an import path for this QML engine (calls QQmlEngine::addImportPath)

Returns a pointer to the C++ object. The pointer is of the type QQmlEngine * in C++.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.