Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111169

qt_generate_foreign_qml_types(): Add flag to specify ownership

    XMLWordPrintable

Details

    • 4f33440a6 (dev), c94e5c8af (6.5), 53f64f76f (6.4)

    Description

      In the final example at https://doc.qt.io/qt-6/qqmlengine.html#QML_SINGLETON, the QML_FOREIGN() struct sets QJSEngine::CppOwnership in the create() function.

      qt_generate_foreign_qml_types() should have a flag to set QJSEngine::CppOwnership in the generated code.

      Attachments

        1. Colors.cpp
          0.6 kB
        2. Colors.h
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes