Qt 6.12 LTS is out! See what's new in the release
blog
QQmlEngine::setExternalSingletonInstance
-
It looks like a feature has been added in Qt 6.12 that addresses a weakness that I have complained about before in that, since being encouraged to move away from using
setContextProperty, it has become more awkward to wire things up in the C++ backend without having to do things like introducing actual C++ singletons.There is a nice write up about it here: https://www.kdab.com/singleton-controllers-in-times-of-declarative-qml/