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

Make QML imports available under Qt minor version

    XMLWordPrintable

    Details

    • Type: User Story
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Documentation, Quick: Other
    • Labels:
      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

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

          Activity

            People

            Assignee:
            kkohne Kai Köhne
            Reporter:
            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