QQmlParserStatus Class
The QQmlParserStatus class tells an object when QML starts and finishes making it. More…
| Header | #include <QQmlParserStatus> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Qml) |
| Module | Nt Qml C++ Classes |
| Inherited by | QtFM::FmSound |
List of all members, including inherited members
Public Functions
| virtual | ~QQmlParserStatus() |
| virtual void | classBegin() |
| virtual void | componentComplete() |
Detailed Description
A C++ type that needs all its properties before it can do its work inherits QQmlParserStatus as well as QObject: classBegin() is called when the object has been made, before its properties are set, and componentComplete() when its component is complete, all bindings set.
class Loader : public QObject, public QQmlParserStatus {
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
...
void classBegin() override {}
void componentComplete() override { load(m_source); }
};
Differences from Qt
None; Q_INTERFACES is not needed in Nt, which finds the interface with dynamic_cast.
Member Function Documentation
QQmlParserStatus::~QQmlParserStatus()
Destroys the object.
void QQmlParserStatus::classBegin()
Called when the object has been made, before its properties are set.
void QQmlParserStatus::componentComplete()
Called when the component of the object is complete: all its objects made and their bindings set.