Qt 6 是努力使框架更高效,且更易于使用的结果。
为兼容每个发行的所有公共 API,我们试着维护二进制和源代码。但是,为使 Qt 成为更优框架,一些改变是不可避免的。
One of those changes was to remove the platform-specific Extras modules, to ensure a cohesive cross-platform story and future for Qt 6. Most of the the functionality offered by these modules are replaced by a similar functionality in other Qt modules. This guide summarizes those alternatives, and provides guidance for the cases where Qt does not offer a replacement API.
Most members of the QtMac namespace have
explicit replacements
。
QtMac::fromCGImageRef
function has been removed due to lack of known clients of the API.
QMacPasteboardMime
class has been removed due to warranting a cross-platform solution. See
QTBUG-93632
了解细节。
QMacToolBar
and
QMacToolBarItem
classes have been removed. Use
QToolBar
as a replacement.
Many members of the QtWin namespace have explicit replacements . To use these replacements with Qt Widgets or Qt Quick, operate on the QWindow representation of the relevant widget or control.
The remaining functions have been removed:
Only used internally in WinExtras. No other known clients of the API.
Concept exists on other platforms (tint/accent color). Warrants new cross-platform API, for example a new QPalette role or platform theme property.
Windows 7 feature. No longer supported in Windows 10.
Similar functionality exists on other platforms. Warrants cross-platform QWindow API to control the relationship between the client area and the non-client area (frame/titlebar). See QTBUG-94010 了解细节。
Deprecated as of Windows 8.
No known clients of the API.
QWinMime
class has been removed due to warranting a cross-platform solution. See
QTBUG-93632
了解细节。
Clients that still rely on the functionality can include the private headers
<QtGui/private/qtguiapplication_p.h>
and
<QtGui/private/qwindowsmime_p.h>
and use the QWindowsApplication native interface to register new MIME types. To enable private headers use
QT += gui-private
with
qmake
, or add a project dependency to
Qt::GuiPrivate
with
CMake
.
QWinJumpList
,
QWinJumpListCategory
,和
QWinJumpListItem
classes have been removed due to warranting a cross-platform solution. See
QTBUG-94007
了解细节。
QWinTaskbarButton
and
QWinTaskbarProgress
classes have been removed due to warranting a cross-platform solution. See
QTBUG-94009
and
QTBUG-94008
了解细节。
QWinThumbnailToolBar
and
QWinThumbnailToolButton
classes have been removed due to lack of known clients of the API.
QX11Info
class has been removed.
Clients that still rely on the functionality can include the private header
<QtGui/private/qtx11extras_p.h>
as a stopgap solution. To enable private headers use
QT += core-private
with
qmake
, or add a project dependency to
Qt::CorePrivate
with
CMake
.
Key functionality from the module has been brought over to other Qt modules.
Clients that still rely on missing functionality can include the private header
<QtGui/private/qtandroidextras_p.h>
as a stopgap solution. To enable private headers use
QT += core-private
with
qmake
, or add a project dependency to
Qt::CorePrivate
with
CMake
.
QAndroidJniObject
and
QAndroidJniEnvironment
classes have been replaced by
QJniObject
and
QJniEnvironment
分别。
QAndroidJniExceptionCleaner
class is no longer needed. See
QJniEnvironment::checkAndClearExceptions
() for a replacement.
Many members of the QtAndroid namespace have replacements in the QAndroidApplication native interface.