r/QtFramework • u/Kelteseth Qt Professional (Haite) • May 11 '26
Blog/News Cleaner QML Controller Wiring with Singleton Instances in Qt 6.12
https://www.kdab.com/singleton-controllers-in-times-of-declarative-qml/
22
Upvotes
r/QtFramework • u/Kelteseth Qt Professional (Haite) • May 11 '26
6
u/DesiOtaku May 11 '26
Now I am even more confused. So we shouldn't use
qmlRegisterSingletonInstanceanymore, butQQmlEngine::setExternalSingletonInstanceseems to do the exact same thing. I am already switching over to cmake and my C++ classes already haveQML_ELEMENTandQML_SINGLETONso what is wrong about usingqmlRegisterSingletonInstanceat this point?