what is benefits of using qmlRegisterSingletonType ?
-
i want to know the benefits of using :
- qmlRegisterSingletonType
- qmlRegisterUncreatableType
- qmlRegisterType
-
You get a singleton, what else? A single instance of an object, storing the same state no matter where you access it.
-
You get a singleton, what else? A single instance of an object, storing the same state no matter where you access it.
@sierdzio can you tell me benefits of using qmlRegisterUncreatableType
& qmlRegisterType ? -
@sierdzio can you tell me benefits of using qmlRegisterUncreatableType
& qmlRegisterType ?qmlRegisterUncreatableType
Use it if you need to expose type information but your don't need to instantiate it. For example, you can use it to expose an
enum
to QML.qmlRegisterType
This fully registers a Q_OBJECT to be used in QML. You can instantiate it in QML, modify it's properties etc.