Welcome!
欢迎加入!
Welcome to The Qt 6 Book - A book about QML. This text will guide you through QML, Qt's language for creating dynamic user interfaces.
欢迎阅读这本Qt6书籍——本关于QML的书。本文将指导您学习QML,这是Qt用于创建动态用户界面的一种语言。
I believe that the ability to build declarative, reactive, hardware accelerated user interfaces executing at native performance across all major platforms (and some not so major) is a game changer. When starting with Qt, it was almost as if I had my secret weapon to building software quickly. QML takes that to the next level.
我相信,在所有主要平台(以及一些不太重要的平台)上构建声明式、响应式、硬件加速用户界面的能力将改变游戏规则。刚开始使用Qt时,就好像我拥有了快速构建软件的秘密武器。QML将其提升到一个新的层次。
How is this book different from the Qt documentation? I hear you ask. The intention is to build a complement. This book is meant as a book that you can read from front to back where each chapter builds on what you've previously learned. But it can also be used as a way for the experienced reader to get oriented in a new topic. Each chapter focuses on a specific topic and introduces the concepts from Qt and QML. However, the Qt documentation will always provide the full picture and is a great reference to look up the details about all elements, properties, enumerations, and more.
我听到你在问,这本书与Qt文档有什么不同?编写本书的目的是作为Qt文档的补充。这本书的意图是你从头读到尾,每一章都是建立在你之前所学的基础上。但它也可以用来作为一种工具书,让有经验的读者在遇到特定的问题时查看。每一章都聚焦于一个特定的主题,并介绍Qt和QML的相关概念。相反,Qt文档总是提供全套资料,并且是提供所有元素、属性、枚举等细节的参考。
I wish you a pleasant read!
祝您阅读愉快!
Johan Thelin
Structure
本书结构
The book can be said to be split into three parts. The split is not clear cut enough to motivate a strict division of chapters, but more of a guideline that we've tried to follow when writing it.
这本书可以分为三个部分。这种划分并不是严格划分各章节,更像是我们在编写时所使用的参考指南。
The first few chapters, let's say until somewhere around chapter 5 - 7 can be considered an introduction. If you want to learn QML, you should make sure to read these chapters.
在第5 - 7章前的几章,可以看作是序言。如果你想学习QML,你应该确保已经阅读了这些章节。
The following chapters, 6-14, can be seen as fairly separate chapters introducing independent topics, even though the models from chapter 7 are used in many more places. Feel free to dive into these in the order that you like and learn about the topics that you are curious about.
接下来的的6-14章,可以看作是独立章节,尽管第7章中的模型在多处使用。你可以按照个人喜好的来学习感兴趣的章节。
The remainder of the book focuses on more advanced topics such as details of JavaScript, mixing C++ and QML, and the Qt for Python bindings and QML. These are important topics and I really want you to read them. To build a full application with QML you need to understand these topics, but their main focus is not on QML.
本书的其余部分集中在更高级的主题上,比如JavaScript的细节、c++和QML的混合编程以及在Python使用Qt绑定和QML。这些都是很重要的话题,我真心希望你们去阅读。要用QML构建一个完整的应用程序,您需要理解这些主题,虽然它们的重点不是QML。
Never Ending Work in Progress
不停的完善
The Qt 6 Book is a never ending work in progress. We welcome contributors and are planning to open up our infrastructure to let you contribute both by reporting issues and by contributing fixes and new content. The end goal is to present you with a printed book when the material has reached a maturity level that we are happy with, but we want to share this with you already now and to learn from your feedback what to improve, and what additional content to add.
这本书是一部不断创作的作品。我们欢迎贡献者,参与开发我们的基础工作,通过报告问题、提交新内容来贡献一份力量。最终目标是当内容达到我们满意的水平时,向您提供一本书。但是我们想现在就与您分享下,并从您的反馈中了解需要改进的地方,以及补充的额外内容。