Qt 5 Core Compatibility APIs

The Qt 5 Core Compat module contains the Qt 5 Core APIs that were removed in Qt 6. The module facilitates the transition to Qt 6.

使用模块

Using a Qt module's C++ API requires linking against the module library, either directly or through other dependencies. Several build tools have dedicated support for this, including CMake and qmake .

构建采用 CMake

使用 find_package() command to locate the needed module component in the Qt6 包:

find_package(Qt6 REQUIRED COMPONENTS Core5Compat)
target_link_libraries(mytarget PRIVATE Qt6::Core5Compat)
					

更多细节,见 构建采用 CMake 概述。

采用 qmake 构建

To configure the module for building with qmake, add the module as a value of the QT variable in the project's .pro file:

QT += core5compat
					

参考

许可和归属

Qt 5 Core Compat is available under commercial licenses from Qt 公司 . In addition, it is available under free software licenses: The GNU LGPL (次一般公共许可) 第 3 版 ,或 GNU GPL (一般公共许可) 第 2 版 。见 Qt 许可 进一步了解细节。

Furthermore, Qt 5 Core Compat in Qt 6.5.1 contains third party modules under the following permissive licenses:

文本编解码器:EUC-JP BSD 2 条款简化许可
文本编解码器:EUC-KR BSD 2 条款简化许可
文本编解码器:GBK BSD 2 条款简化许可
文本编解码器:ISO 2022-JP (JIS) BSD 2 条款简化许可
文本编解码器:Shift-JIS BSD 2 条款简化许可
文本编解码器:TSCII BSD 2 条款简化许可
文本编解码器:Big5、Big5-HKSCS BSD 2 条款简化许可