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

Make QML imports available under Qt minor version

    XMLWordPrintable

Details

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

    Description

      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
      

      Attachments

        For Gerrit Dashboard: QTBUG-74032
        # Subject Branch Project Status CR V

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes