版本计划
版本
Qt Quick Controls 2.0 在 Qt 5.7 中引入。随后发布的 Qt 次版本将Qt Quick Controls 模块的导入版本递增一个,直到 Qt 5.12,导入版本与 Qt 的次版本一致。
在 Qt 6 中,主版本和次版本都匹配,QML 中的导入可以省略版本号。如果省略了版本号,将使用最新版本。
Qt Labs 实验模块使用导入版本 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 |
| ... | ... | ... | ... |
修订
由于Qt Quick 控件的实现方式,添加的新属性可能会与任何用户定义的同名属性发生冲突。例如,以下代码段将导致错误:
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 } }
这些属性应重新命名,以避免冲突。
© 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.