Qt 6.4 Released
Qt 6.4发布
September 29, 2022 by Volker Hilsheimer | Comments
2022年9月29日Volker Hilsheimer评论
Today we have released Qt 6.4! The latest version of Qt introduces support for a new platform, brings lots of new functionality - some as technology previews (TP) - and plenty of improvements under the hood. Let's start with the biggest highlight.
今天我们发布了Qt 6.4!Qt的最新版本引入了对新平台的支持,带来了许多新功能,其中一些是技术预览版(TP),还有许多改进。让我们从最大的亮点开始。
WebAssembly
Web组件
With Qt 6.4 we are taking the support for WebAssembly out of technology preview. With Qt for WebAssembly, Qt developers can use their existing skills, and often existing code, to target the web. Applications targeting the web assembly platform can run in most modern web browsers, and are easily distributed like any other web content. Thanks to near-native performance, and the rich UI and 3D features of Qt Quick and Qt Quick 3D, solutions requiring heavy data processing and demanding visualization can now easily be built for the web.
在Qt 6.4中,我们将对WebAssembly的支持从技术预览中去掉。使用Qt for WebAssembly,Qt开发人员可以使用他们现有的技能,通常是现有的代码,以web为目标。针对web组装平台的应用程序可以在大多数现代web浏览器中运行,并且像任何其他web内容一样易于分发。由于接近本地的性能,以及Qt-Quick和Qt-Quick3D丰富的UI和3D功能,现在可以轻松地为web构建需要大量数据处理和高要求可视化的解决方案。
However, WebAssembly isn't like any other platform that Qt supports. Applications run in the sandbox of the browser, which imposes some limitations on how much access they have to the local machine or operating system services. And they are also running in an environment that requires cooperation with the browser itself. Qt tries to abstract the respective platform particularities away, both transparently in the platform integration and through some dedicated APIs. To achieve the best results, make yourself familiar with the particular technical requirements for this platform. You can already sign up for our upcoming WebAssembly webinar.
然而,WebAssembly不同于Qt支持的任何其他平台。应用程序在浏览器的沙盒中运行,这对它们对本地机器或操作系统服务的访问权限施加了一些限制。它们也在需要与浏览器本身合作的环境中运行。Qt试图通过平台集成和一些专用API将各自的平台特性抽象出来。为了达到最佳效果,请熟悉此平台的特定技术要求。你已经可以报名参加我们即将举行的网络大会网络研讨会了。
WebAssembly itself continues to be a fast moving platform, with the potential to make a huge impact on the application development industry. We are committed to support web assembly, and will continuously improve and adapt Qt to make sure that Qt applications developed for web assembly continue to provide a great user experience for end users.
WebAssembly本身仍然是一个快速移动的平台,有可能对应用程序开发行业产生巨大影响。我们致力于支持web组装,并将不断改进和调整Qt,以确保为web组装开发的Qt应用程序继续为最终用户提供良好的用户体验。
New and Renewed Modules
新模块和更新模块
Qt 6.4 introduces new modules as technology previews, and brings back one of the modules that hadn't been available for Qt 6 users so far.
Qt6.4引入了新模块作为技术预览,并带回了迄今为止Qt6用户还没有的模块之一。
iOS Style for Qt Quick (TP)
iOS风格Qt-Quick(TP)
User interfaces developed with Qt Quick Controls automatically use the native styling support for Windows and macOS, and for Android using the Material style. For Qt 6.4 we have added a native-looking style for Qt Quick applications running on iOS. The iOS style supports dark and light mode on iOS platforms, and can be used on macOS as well, which makes it easy to develop UIs optimized for that style from the comfort of a macOS development environment.
使用Qt Quick Controls开发的用户界面自动使用Windows和macOS的本地样式支持,以及使用Material样式的Android。对于Qt 6.4,我们为运行在iOS上的Qt Quick应用程序添加了一种本机风格。iOS风格支持iOS平台上的暗模式和亮模式,也可以在macOS上使用,这使得在舒适的macOS开发环境中开发针对该风格优化的UI变得很容易。
Qt HTTP Server (TP)
Qt HTTP服务器(TP)
With this new module we make it easy to add an HTTP server to any Qt application. The server implements partial support for HTTP 1.1, and supports security through the Transport Layer Security protocol. However, it is designed specifically for making data available within a trusted network.
通过这个新模块,我们可以轻松地将HTTP服务器添加到任何Qt应用程序。服务器实现了对HTTP 1.1的部分支持,并通过传输层安全协议支持安全性。然而,它是专门为在可信网络中提供数据而设计的。
Qt Quick 3D Physics (TP)
Qt Quick 3D物理(TP)
We integrated physics simulation into Qt Quick 3D to make it easy to build 3D scenes in which objects move and interact naturally. Handcrafting such scenes and animations can be very laborious, but with the Qt Quick API it becomes very easy to add physics to any 3D scene. The implementation is based on the established, well-tested, and high-performant PhysX engine.
我们将物理模拟集成到Qt-Quick 3D中,以便轻松构建物体自然移动和交互的3D场景。手工制作这样的场景和动画可能非常费力,但使用Qt Quick API,可以很容易地将物理添加到任何3D场景中。该实现基于已建立的、经过良好测试的高性能PhysX引擎。
Qt TextToSpeech
Qt文本到语音
Qt applications support assistive technologies, such as screen readers, by default. But many applications can make additional use of text-to-speech synthesis. Announcing events or changes audibly through speech can make information more easily accessible for any user, esp in situations where attention is not constantly on the screen. We have now ported text-to-speech support to Qt 6, with only minor changes compared to Qt 5's QtSpeech module. The module supports a broad range of text-to-speech synthesizers on desktop, mobile, and embedded platforms, and we have added a QML API.
默认情况下,Qt应用程序支持辅助技术,如屏幕阅读器。但许多应用程序可以额外使用文本到语音合成。通过语音宣布事件或更改可以让任何用户更容易获取信息,尤其是在屏幕上注意力不集中的情况下。我们现在已经将文本到语音支持移植到Qt 6,与Qt 5的QtSpeech模块相比,只做了一些小改动。该模块支持桌面、移动和嵌入式平台上广泛的文本到语音合成器,我们还添加了QML API。
New functionality
新功能
And a lot has happened in the existing modules.
在现有的模块中发生了很多事情。
Qt Quick 3D
Support for global illumination with pre-generated lightmaps allows creating more realistic 3D scenes, using different light-sources, while keeping the performance cost at runtime at a minimum. This feature is in early technology preview, and we are looking forward to your feedback!
通过预生成的光照贴图支持全局照明,可以使用不同的光源创建更逼真的3D场景,同时将运行时的性能成本保持在最低。此功能在早期技术预览中,我们期待您的反馈!
In addition, we have added line particles, support for specular glossy materials, more configure options for reflection probes, skyboxes, custom materials, and textures to the toolbox.
此外,我们在工具箱中添加了线粒子、镜面光泽材质支持、反射探测器、天空盒、自定义材质和纹理的更多配置选项。
Qt Quick Item Views
Qt Quick项目视图
We have added more functionality to Qt Quick's TableView and TreeView types. Users can now use keyboard navigation, and select rows and columns. Application developers have more control over cell positioning, animations, and expanding and collapsing tree nodes.
我们为Qt Quick的TableView和TreeView类型添加了更多功能。用户现在可以使用键盘导航,并选择行和列。应用程序开发人员可以更好地控制单元定位、动画以及展开和折叠树节点。
Smoother animations in Qt Quick
Qt Quick中的平滑动画
In addition to improvements under the bonnet that make Qt's threaded render loop automatically handle broken vsync throttling, we have added a new FrameAnimation animation type that allows to run your code in sync with the animation frames.
除了引擎盖下的改进,使Qt的线程渲染循环能够自动处理中断的vsync调节,我们还添加了一种新的FrameAnimation动画类型,允许与动画帧同步运行代码。
QQuickWidget with full RHI support
完全支持RHI的QQuickWidget
With QQuickWidget you can build application user interfaces where Qt Quick and Qt Widget elements coexist. Until now this required using OpenGL. For Qt 6.4 we redesigned the class from the ground up, and now QQuickWidget is functional with all supported graphics APIs: Metal, Vulkan, Direct3D 11, in addition to OpenGL.
使用QQuickWidget,您可以构建Qt-Quick和Qt-Widget元素共存的应用程序用户界面。到目前为止,这需要使用OpenGL。对于Qt 6.4,我们从头开始重新设计了该类,现在QQuickWidget可以与所有受支持的图形API一起使用:Metal、Vulkan、Direct3D 11,以及OpenGL。
Serve data securely with QSslServer
使用QSslServer安全地服务数据
Qt's network module has made it easy to write efficient TCP servers, and with Qt 6.4 we are making it just as easy to write servers that communicate over TLS.
Qt的网络模块使编写高效的TCP服务器变得容易,而Qt 6.4使编写通过TLS通信的服务器变得同样容易。
Qt Multimedia
Qt多媒体
We have added an FFMPEG-based multimedia backend, which provides consistent audio and video functionality on all platforms. For video playback we have improved the color space handling and HDR support, and applications can inject subtitles to QVideoFrames.
我们添加了一个基于FFMPEG的多媒体后端,它在所有平台上提供一致的音频和视频功能。对于视频播放,我们改进了颜色空间处理和HDR支持,应用程序可以向QVideoFrames注入字幕。
A new feature under technology preview is support for spatial audio. You can now create three-dimensional sound scenes, where Qt emulates a virtual room with sound characteristics based on the size of the room, the material of the walls and floor, and the position of the listener. This feature is in technology preview.
技术预览下的一个新功能是支持u音频。现在,您可以创建三维声音场景,其中Qt根据房间的大小、墙和地板的材质以及侦听器的位置模拟具有声音特性的虚拟房间。此功能在技术预览中。
Useful new features in Qt Widgets
Qt Widgets中有用的新功能
QFormLayout makes it easy to build user interfaces for capturing structured user input, and QWizard is a classic solution for guiding users through a complex task over a sequence of steps. For Qt 6.4 we have added APIs to control the visibility of rows in a formlayout, and to jump to any page in a wizard. Builders of complex applications with many keyboard shortcuts will find the small addition of an optional clear-button to QKeySequenceEdit useful.
QFormLayout使构建用于捕获结构化用户输入的用户界面变得容易,而QWizard是一个经典的解决方案,用于指导用户通过一系列步骤完成复杂任务。对于Qt 6.4,我们添加了API来控制表单布局中的行的可见性,并跳转到向导中的任何页面。拥有许多键盘快捷键的复杂应用程序的构建者会发现在QKeySequenceEdit中添加一个可选的清除按钮很有用。
QML
Better support for value types makes it easier, and cheaper, to expose structured data from C++ to QML. Value types, and lists of value types, can be used for properties without the overhead of QObject-wrappers.
更好地支持值类型使得将C++中的结构化数据公开到QML更容易、更便宜。值类型和值类型列表可以用于属性,而无需QObject包装器的开销。
On the tooling side, you can look forward to the QML language server providing real-time feedback in your QML-enabled IDE. And the QML linter now can identify inefficient or improper usage of Qt Quick and Qt Quick Controls and generate warnings at build-time.
在工具方面,您可以期待QML语言服务器在支持QML的IDE中提供实时反馈。现在,QML linter可以识别Qt-Quick和Qt-QuickControls的低效或不当使用,并在构建时生成警告。
The QML Type Compiler is now enabled by default, and can compile more QML into C++.
QML类型编译器现在默认启用,可以将更多QML编译到C++中。
The long tail
其他工作
In addition to the above, a lot of work has gone into making it easier to work with string literals in your code. QStringEncoder and QStringDecoder now support all codecs supported by ICU (as long as Qt has been built with ICU support). Interoperability of Qt's date and time classes with std::chrono is improved, and Markdown is now supported as input and output when working with QTextDocuments.
除上述内容外,还进行了大量工作,使代码中的字符串文字更容易使用。QStringEncoder和QStringDecoder现在支持ICU支持的所有编解码器(只要Qt是在ICU支持下构建的)。Qt的日期和时间类与std::chrono的互操作性得到了改进,在使用QTextDocuments时,现在支持将Markdown作为输入和输出。
Developers targeting the Android platform will find it easier to call Android APIs from C++ using the new variadic template overloads of various QJniObject and QJniEnvironment methods.
针对Android平台的开发人员会发现,使用各种QJniObject和QJniEnvironment方法的新可变模板重载,从C++调用Android API更容易。
Commercial add-ons
商业附加组件
If you are a commercial license holder, then you can download the Qt VNC Server as a technology preview. It works on top of Qt 6.4, and allows you to share any Qt Quick application with a VNC-compatible client.
如果您是商业许可证持有人,那么可以下载QtVNC服务器作为技术预览。它在Qt6.4之上工作,允许您与VNC兼容的客户端共享任何QtQuick应用程序。
The QML Script Compiler is part of the commerical Qt Quick Compiler Extensions, and with Qt 6.4 it can generate C++ code for operations on lists of value types, and generates better code for type conversions.
QML脚本编译器是商业Qt Quick编译器扩展的一部分,使用Qt 6.4,它可以为值类型列表上的操作生成C++代码,并为类型转换生成更好的代码。
Looking ahead
展望未来
With Qt 6.4 we are introducing a number of new features as technology previews. Keep your eyes open for Qt for Python 6.4, and full support for Qt 6.4 in the upcoming Qt Design Studio releases.
在Qt 6.4中,我们引入了一些新功能作为技术预览。请密切关注Python 6.4的Qt,并在即将发布的Qt Design Studio版本中全面支持Qt 6.4。
The next release, Qt 6.5, will come with long-term-support for commercial users, and our focus will be on stabilizing and finalizing those features based on your feedback. In addition, we are working on the port of Qt Location to Qt 6, we are improving the theming support for Windows 11 and Linux desktops, and the work on improving the performance of QML through compiler tooling and better value type support continues.
下一个版本Qt6.5将为商业用户提供长期支持,我们的重点是根据您的反馈稳定并最终确定这些功能。此外,我们正在研究Qt Location到Qt 6的移植,我们正在改进对Windows 11和Linux桌面的主题化支持,并继续通过编译器工具和更好的值类型支持来改进QML的性能。
For more details also beyond Qt 6.5, check our "Roadmap to the future of Qt" webinar.
有关Qt 6.5以外的更多详细信息,请查看我们的“Qt未来路线图”网络研讨会。
Thanks
感谢
Finally, I’d like to thank everybody that has helped make Qt 6.4 happen. You can find a full list of all contributors to the Qt source code at the end of the release notes. And there are also many others that have helped by reporting bugs, send us their feedback, and keeping our Continuous Integration infrastructure running.
最后,我要感谢所有帮助实现Qt 6.4的人。您可以在发行说明的末尾找到Qt源代码的所有贡献者的完整列表。此外,还有许多其他公司通过报告错误、向我们发送反馈以及保持我们的持续集成基础架构运行而提供了帮助。
As always, the new release will be available in the Qt installer. You can also get the release from our download page or your Qt Account page.
一如既往,新版本将在Qt安装程序中提供。您也可以从我们的下载页面或您的Qt帐户页面获得该版本。