Versionierungsschema
Versionen
Qt Quick Controls 2.0 wurde in Qt 5.7 eingeführt. Nachfolgende kleinere Qt-Releases erhöhen die Importversion der Qt Quick Controls-Module um eins, bis Qt 5.12, wo die Importversionen mit der kleineren Version von Qt übereinstimmen.
In Qt 6 stimmen sowohl die Haupt- als auch die Nebenversion überein, und die Versionsnummern können bei Importen in QML weggelassen werden. Wenn die Version weggelassen wird, wird die neueste Version verwendet.
Die experimentellen Qt Labs Module verwenden die Importversion 1.0.
Qt | QtQuick | QtQuick.Controls,QtQuick.Controls.Material,QtQuick.Controls.Universal,QtQuick.Templates | Qt.labs.platform |
|---|---|---|---|
| 5.7 | 2.7 | 2.0 | 1.0 |
| 5.8 | 2.8 | 2.1 | 1.0 |
| 5.9 | 2.9 | 2.2 | 1.0 |
| 5.10 | 2.10 | 2.3 | 1.0 |
| 5.11 | 2.11 | 2.4 | 1.0 |
| 5.12 | 2.12 | 2.12 | 1.0 |
| 6.0 | 6.0 | 6.0 | 1.0 |
| ... | ... | ... | ... |
Überarbeitungen
Aufgrund der Art und Weise, wie Qt Quick Controls implementiert sind, können neue Eigenschaften, die hinzugefügt werden, mit benutzerdefinierten Eigenschaften desselben Namens kollidieren. Der folgende Ausschnitt führt zum Beispiel zu einem Fehler:
import QtQuick.Controls 2.13 ApplicationWindow { // ... ComboBox { anchors.centerIn: parent // As currentValue was added in 2.14, the versioned import above // should cause this property to be used, but instead an error is produced: // "Cannot override FINAL property" property int currentValue: 0 } }
Diese Eigenschaften sollten umbenannt werden, um den Konflikt zu vermeiden.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.