According to Qt documentation:

Data Ownership

When data is transferred from C++ to QML, the ownership of the data always remains with C++. The exception to this rule is when a QObject is returned from an explicit C++ method call: in this case, the QML engine assumes ownership of the object, unless the ownership of the object has explicitly been set to remain with C++ by invoking QQmlEngine::setObjectOwnership() with QQmlEngine::CppOwnership specified.
It means that call of getter function of properties doesn't change ownership.
When i have some derived from QObject class with properties of simple type(int, QString...), registered in QML (via qmlRegisterSingletonType) and used as CppOwnership instance.
Qt Code:
  1. class TCustomDraw: public QObject
  2. {
  3. Q_OBJECT
  4. public:
  5. Q_PROPERTY (QColor color READ colorValue NOTIFY colorChanged)
  6. QColor colorValue() const
  7. {
  8. return m_color;
  9. }
  10. signals:
  11. void colorChanged();
  12. private:
  13. QColor m_color;
  14. };
To copy to clipboard, switch view to plain text mode 
And QML main window:
Qt Code:
  1. import QtQuick 2.12
  2. import QtQuick.Controls 2.12
  3. import QtQuick.Controls 1.4
  4. import QtQuick.Controls.Styles 1.4
  5. import QtQuick.Dialogs 1.1
  6. import QtQuick.Layouts 1.0
  7. ]import QtQuick.Window 2.12
  8. import Qt.labs.platform 1.1
  9. import QtQml 2.12
  10. import QtQuick.Shapes 1.12
  11. import customdraw 1.0
  12.  
  13. Window {
  14. id: wnd
  15. width: 640
  16. height: 480
  17. visible: true
  18. Button {
  19. anchors.fill: parent
  20. onClicked: {
  21. var f = TCustomDraw.color
  22. }
  23. }
  24. }
To copy to clipboard, switch view to plain text mode 
What happens with ownership of color object when i press the Button ?
If ownership of color object remains in c++ does it mean a memory leakage ?