diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2016-10-14 12:05:08 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2016-10-14 12:01:53 +0000 |
commit | 6d732026a518741718528052656a513761451b31 (patch) | |
tree | a5b42d89cbceef6649c72078de45eb995bef74fa | |
parent | 67e5fe1675b459de9a688be2509a060e8ccecc9e (diff) |
Fix docs about ownership when QObject has a parent
If you return a QObject with parent from a Q_INVOKABLE it *does*
get QQmlEngine::JavaScriptOwnership. It just doesn't get deleted
by JavaScript (until you unset it's parent).
Change-Id: Id56debe06253ea1dd31dee844f5047d4ac055024
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | src/qml/doc/src/cppintegration/data.qdoc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/doc/src/cppintegration/data.qdoc b/src/qml/doc/src/cppintegration/data.qdoc index ff30bffa83..1b75f6d14e 100644 --- a/src/qml/doc/src/cppintegration/data.qdoc +++ b/src/qml/doc/src/cppintegration/data.qdoc @@ -52,8 +52,8 @@ remain with C++ by invoking QQmlEngine::setObjectOwnership() with QQmlEngine::CppOwnership specified. Additionally, the QML engine respects the normal QObject parent ownership -semantics of Qt C++ objects, and will not ever take ownership of a QObject -instance which already has a parent. +semantics of Qt C++ objects, and will never delete a QObject instance which +has a parent. \section1 Basic Qt Data Types |