Add note about calling invokable functions from QML when returning QObjects

Link to the data ownership section of the QML documentation to elaborate
on the special rules that apply for invokable functions that return
QObjects.

Change-Id: I41ea9089468c9505807cf1fde22be759b397a6d3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Simon Hausmann 2018-06-06 10:10:53 +02:00
parent ae42461f44
commit bf1f17364f

View File

@ -4533,6 +4533,11 @@ QDebug operator<<(QDebug dbg, const QObject *o)
invoked using QMetaObject::invokeMethod().
Since \c normalMethod() function is not registered in this way, it cannot
be invoked using QMetaObject::invokeMethod().
If an invokable member function returns a pointer to a QObject or a
subclass of QObject and it is invoked from QML, special ownership rules
apply. See \l{qtqml-cppintegration-data.html}{Data Type Conversion Between QML and C++}
for more information.
*/
/*!