Versionsschema
Versionen
Qt Quick Controls 2.0 wurde in Qt 5.7 eingeführt. Bei nachfolgenden Qt-Minor-Releases wird die Importversion der Module „ Qt Quick Controls “ um eins erhöht, bis hin zu Qt 5.12, wo die Importversionen mit der Minor-Version von Qt übereinstimmen.
In Qt 6 stimmen sowohl die Haupt- als auch die Nebenversion überein, und Versionsnummern können bei Importen in Qml weggelassen werden. Wird die Version weggelassen, 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 |
| ... | ... | ... | ... |
Änderungen
Aufgrund der Implementierung von „ Qt Quick Controls “ können neu hinzugefügte Eigenschaften zu Konflikten mit benutzerdefinierten Eigenschaften gleichen Namens führen. Der folgende Codeausschnitt führt beispielsweise 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.