Expand description
This crate was generated by ritual
.
See README for more information.
Re-exports§
Modules§
- Functions that provide access to C++ operators
- C++ type:
QJSEngine
- C++ type:
QJSValue
- C++ type:
QList<QJSValue>
- C++ type:
QList<QQmlError>
- C++ type:
QQmlAbstractUrlInterceptor
- C++ type:
QQmlComponent
- C++ type:
QQmlContext
- C++ type:
QQmlDebuggingEnabler
- C++ type:
QQmlEngine
- C++ type:
QQmlFile
- C++ type:
QQmlImageProviderBase
- C++ type:
QQmlIncubator
- C++ type:
QQmlProperty
- C++ namespace:
QV4
- C++ namespace:
QtQml
Structs§
The QJSValueIterator constructor takes a QJSValue as argument. After construction, the iterator is located at the very beginning of the sequence of properties. Here's how to iterate over all the properties of a QJSValue:
The QList class is a template class that provides lists.
The QList class is a template class that provides lists.
QQmlAbstractUrlInterceptor is an interface which can be used to alter URLs before they are used by the QML engine. This is primarily useful for altering file urls into other file urls, such as selecting different graphical assets for the current platform.
This class combines a QQmlEngine and QQmlComponent to provide a convenient way to load a single QML file. It also exposes some central application functionality to QML, which a C++/QML hybrid application would normally control from C++.
Components are reusable, encapsulated QML types with well-defined interfaces.
Contexts allow data to be exposed to the QML components instantiated by the QML engine.
- C++ class:
QQmlDebuggingEnabler
. Each QML component is instantiated in a QQmlContext. QQmlContext's are essential for passing data to QML components. In QML, contexts are arranged hierarchically and this hierarchy is managed by the QQmlEngine.
For example, given a file
main.qml
like this:- C++ class:
QQmlExtensionInterface
. QQmlExtensionPlugin is a plugin interface that makes it possible to create QML extensions that can be loaded dynamically into QML applications. These extensions allow custom QML types to be made available to the QML engine.
- C++ class:
QQmlFile
. QQmlFileSelector will automatically apply a QFileSelector to qml file and asset paths.
Image providers must be registered with the QML engine. The only information the QML engine knows about image providers is the type of image data they provide. To use an image provider to acquire image data, you must cast the QQmlImageProviderBase pointer to a QQuickImageProvider pointer.
In order to behave asynchronously and not introduce stutters or freezes in an application, the process of creating objects a QQmlIncubators must be driven only during the application's idle time. QQmlIncubationController allows the application to control exactly when, how often and for how long this processing occurs.
Creating QML objects - like delegates in a view, or a new page in an application - can take a noticeable amount of time, especially on resource constrained mobile devices. When an application uses QQmlComponent::create() directly, the QML object instance is created synchronously which, depending on the complexity of the object, can cause noticeable pauses or stutters in the application.
- C++ class:
QQmlInfo
. QQmlListReference allows C++ programs to read from, and assign values to a QML list property in a simple and type-safe way. A QQmlListReference can be created by passing an object and property name or through a QQmlProperty instance. These two are equivalent:
A QML engine uses QNetworkAccessManager for all network access. By implementing a factory, it is possible to provide the QML engine with custom QNetworkAccessManager instances with specialized caching, proxy and cookies support.
QQmlParserStatus provides a mechanism for classes instantiated by a QQmlEngine to receive notification at key points in their creation.
As QML uses Qt's meta-type system all of the existing QMetaObject classes can be used to introspect and interact with objects created by QML. However, some of the new features provided by QML - such as type safety and attached properties - are most easily used through the QQmlProperty class that simplifies some of their natural complexity.
QQmlPropertyMap provides a convenient way to expose domain data to the UI layer. The following example shows how you might declare data in C++ and then access it in QML.
See Property Value Sources for information on writing custom property value sources.
QQmlScriptString is used to create QObject properties that accept a script "assignment" from QML.
- C++ class:
QQmlTypesExtensionInterface
. The QVector class is a template class that provides a dynamic array.
- Emits a Qt signal with arguments
*const crate::QListOfQQmlError
. - Emits a Qt signal with arguments
*mut ::qt_core::QObject,*const ::qt_core::QUrl
. - Emits a Qt signal with arguments
*const ::qt_core::QString,*const ::qt_core::QVariant
. - Emits a Qt signal with arguments
crate::q_qml_component::Status
. - Binds a Qt signal with arguments
*const crate::QListOfQQmlError
to a Rust closure. - Binds a Qt signal with arguments
*mut ::qt_core::QObject,*const ::qt_core::QUrl
to a Rust closure. - Binds a Qt signal with arguments
*const ::qt_core::QString,*const ::qt_core::QVariant
to a Rust closure. - Binds a Qt signal with arguments
crate::q_qml_component::Status
to a Rust closure.
Functions§
- q_
hash_ ⚠option_ fn cpp_lib_version="5.13.0"
orcpp_lib_version="5.14.0"
Calls C++ function:unsigned int qHash(QObject * (*FN_PTR)(QObject *) func)
. - q_
hash_ ⚠option_ fn_ uint cpp_lib_version="5.13.0"
orcpp_lib_version="5.14.0"
Calls C++ function:unsigned int qHash(QObject * (*FN_PTR)(QObject *) func, unsigned int seed = …)
. - Calls C++ function:
unsigned int qHash(const QQmlProperty& key)
. - Calls C++ function:
QPointer<QObject> qPointerFromVariant<QObject>(const QVariant& variant)
. - Calls C++ function:
QJSEngine* qjsEngine(const QObject* arg1)
. - Calls C++ function:
bool qjsvalue_cast_helper(const QJSValue& value, int type, void* ptr)
. Clears all stored type registrations, such as those produced with qmlRegisterType().
This function protects a module from having types registered into it. This can be used to prevent other plugins from injecting types into your module. It can also be a performance improvement, as it allows the engine to skip checking for the possibility of new types or plugins when this import is reached.
This function registers a module in a particular uri with a version specified in versionMajor and versionMinor.
This function may be used to register a singleton type with the name qmlName, in the library imported from uri having the version number composed from versionMajor and versionMinor. The type is defined by the QML file located at url. The url must be an absolute URL, i.e. url.isRelative() == false.
This function registers a type in the QML system with the name qmlName, in the library imported from uri having the version number composed from versionMajor and versionMinor. The type is defined by the QML file located at url. The url must be an absolute URL, i.e. url.isRelative() == false.
This function registers a type in the QML system with the name qmlName, in the type namespace imported from uri having the version number composed from versionMajor and versionMinor, but any attempt to instantiate the type will produce the given error message.
This function registers the staticMetaObject and its extension in the QML system with the name qmlName in the library imported from uri having version number composed from versionMajor and versionMinor.
- qml_
type_ ⚠id cpp_lib_version="5.13.0"
orcpp_lib_version="5.12.2"
orcpp_lib_version="5.14.0"
Returns the QML type id of a type that was registered with the name qmlName in a particular uri and a version specified in versionMajor and versionMinor.