Any way to get a callback when Qml item is created but before properties are accessed?
Solved
QML and Qt Quick
-
I have a C++ QObject type that can be created in Qml, and I want to be able to initialize the object after it is created by before properties start getting set on it. Is this possible?
This is because I have an initialize() method that the superclass requires to be called after the subclass constructor is called, and there may be multiple levels of subclasses.
A
QObject::Created
event orcreated()
would work if they occurred immediately following thenew MyType()
call and before the object was used.Thanks!
-
@patrickkidd
implement the QQmlParserStatus::componentComplete() interface