how to resister a singleton instance of a class for the qmlRegisterSingletonType?
Unsolved
General and Desktop
-
I just tried to use the qmlRegisterSingletonType to register an singleton class ,so that the qml file could call the same instance of the c++ class.the examples Ive founded couldnt work.so anyone could help me ?
-
Can you share the code that you have tried ?
-
qmlRegisterSingletonType<MySingleton>("com.example.singleton", 1, 0, "MySingleton", mySingletonProvider);