[Interest] QML engine. Is CppOwnership allowed for singletons?

Dmitry Volosnykh dmitry.volosnykh at gmail.com
Wed Jun 17 12:33:07 CEST 2015


Documentation states that "A QObject singleton type instance returned from
a singleton type provider is owned by the QML engine. For this reason, the
singleton type provider function should not be implemented as a singleton
factory."

I need to use that same singleton object on the C++ side beside its usage
from QML UI.
Can I override this by setting ownership to CppOwnership via
setObjectOwnership()?

Regards,
Dmitry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150617/2c6063f7/attachment.html>


More information about the Interest mailing list