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

Make QML imports available under Qt minor version

XMLWordPrintable

    • Icon: User Story User Story
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • None
    • Documentation, Quick: Other
    • None

      Instead of following an individual versioning scheme, we should make all QML imports that are part of Qt modules available under X.<QT_MINOR_VERSION>.

      For the reasoning, see also https://quips-qt-io.herokuapp.com/quip-0099-qml-versioning.html .

      This is a change that already got started in 5.12, but not all modules have done the switch yet.

      In practice, this means

      Auto-register the import version in the C++ plugin:

              // Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
              qmlRegisterModule(uri, 1, QT_VERSION_MINOR);
      

      set IMPORT_VERSION in the plugins' .pro file:

      IMPORT_VERSION = 1.$$QT_MINOR_VERSION
      [...]
      load(qml_plugin)
      

      and adapting the documentation:

      \qmlmodule QtQuick.Layouts 1.\QtMinorVersion
      
      [...]
      
      The QML types can be imported into your application using the
      following import statement in your .qml file.
      
      \qml \QtMinorVersion
      import QtQuick.Layouts 1.\1
      \endqml
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kkohne Kai Köhne
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes