Commit 6d732026 authored by Sérgio Martins's avatar Sérgio Martins
Browse files

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: default avatarSimon Hausmann <simon.hausmann@qt.io>
Showing with 2 additions and 2 deletions
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment