Summary
小结
In this chapter we have looked at Qt Quick Controls 2. They offer a set of elements that provide more high-level concepts than the basic QML elements. For most scenarios, you will save memory and gain performance by using the Qt Quick Controls 2, as they are based around optimized C++ logic instead of Javascript and QML.
在本章中,我们介绍了Qt Quick Controls 2。它们提供了比高级元素集更多的基本元素类型。对于大多数场景,使用Qt Quick Controls 2节省内存并获得更好的性能,因为它们是基于优化的C++逻辑而不是JavaScript或QML。
We’ve demonstrated how different styles can be used, and how a common code base can be developed using file selectors. This way, a single code base can address multiple platforms with different user interactions and visual styles.
我们已经演示了如何使用不同的样式,以及如何使用文件选择器开发公共代码库。通过这种方式,单个代码库可以处理具有不同用户交互和视觉样式的多个平台。
Finally, we have looked at the Imagine style, which allows you to completely customize the look of a QML application through the use of graphical assets. In this way, an application can be reskinned without any code change whatsoever.
最后,我们看了Imagine样式,它允许您通过使用图形资源文件来完全定制QML应用程序的外观。通过这种方式,应用程序可以在没有任何代码更改的情况下重新设置新样式。