Qt Quick 模板 2
Qt Quick 模板是Qt Quick 控件的基础。模板是控件逻辑和行为的非可视化实现。它们提供了一个界面,使用它可以在 QML 中可视化控件。 Qt Quick.
尽管模板的目标是尽可能与样式无关,但在某些情况下,它们必须对控件的可视化结构做出某些假设。例如,一个自旋框上的按钮可以递增和递减自旋框的值。为了实现自旋框的行为,自旋框模板需要知道用户是在与向上还是向下按钮交互。自旋框模板的可视化实现只需定位向上和向下按钮,并将其可视化为正常、按下和禁用状态。任何输入事件处理和状态处理都由底层模板负责。
模块演变
Qt Quick Controls 的变化列出了 Qt 6 系列 Qt 在模块 API 和功能方面的重要变化。
相关信息
© 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.