QML 教程

本教程介绍用于Qt Quick 用户界面的语言 QML。它并不涵盖所有内容;重点在于教授关键原则,并根据需要介绍一些功能。

通过本教程的不同步骤,我们将学习 QML 值类型,创建自己的 QML 组件,并使用属性和信号,借助状态和转换创建一个简单的动画。

第一章从最简单的 "Hello world "程序开始,接下来的章节将介绍新的概念。

本教程的源代码位于examples/quick/tutorials/helloworld 目录中。

教程章节:

  1. 值类型
  2. QML 组件
  3. 状态和转换

© 2025 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.