-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.1.0
-
4cb85dca8 (dev), e8378c5ec (6.6)
In Qt5, you could mix and match QML module versions with metaobject revisions, via manual calls to qmlRegister*.
In Qt6, with the type registration macros, you cannot do this anymore. The versions declared with the macros hold for any module the type is exposed to. So, if your module exports a version 1.x, and one of your types inherits QQuickItem, then you cannot use the properties added to QQuickItem in the 2.x series of QtQuick.
This effect is exposed in qtdeclarative/examples/qml/tutorials/chapter3-bindings in our examples.
The recommended fix is to:
- bump the module version to match the base classes' maximum versions
- Drop all versions from import statements
Versions in import statements are not needed when you stick to qualified access. Therefore, versions can generally become an internal affair of QML modules.
- relates to
-
QTBUG-98481 decide how to show QML import versions in docs
-
- Closed
-
For Gerrit Dashboard: QTBUG-93780 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
511414,7 | Add Documentation for versioning | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
512892,2 | Add Documentation for versioning | 6.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |