Qt Quick 模板 2
Qt Quick 模板是 Qt Quick Controls。模板是对控件逻辑和行为的非可视化实现。它们提供了一个接口,用于通过 Qt Quick。
尽管模板力求尽可能不依赖特定样式,但在某些情况下,它们仍需对控件的视觉结构做出某些假设。 例如,旋转框(spinbox)上带有用于增减其值的“向上”和“向下”按钮。为了实现旋转框的行为,旋转框模板需要知道用户正在与“向上”按钮还是“向下”按钮进行交互。 spinbox 模板的视觉实现只需定位“上”和“下”按钮,并以正常、按下和禁用三种状态将其可视化。任何输入事件处理和状态处理均由底层模板负责。
模块演变
Qt Quick Controls列出了为 Qt 6 系列所做的模块 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.