从源代码构建 Qt 现在要求 CMake 和 Ninja。见 Qt 6 中的构建系统变化 了解有关配置中此和其它变化的更多细节。
Qt 6.0 比 Qt 5 更精简且某些模块 Qt 6.0 不再默认安装。由于 Qt 是模块化结构,新模块或之前的 Qt 5 模块可能出现在 Qt 6 未来发行中。更多信息,请拜访 所有模块 页面。
Qt 6 中的 Qt 模块变化 有 API 变化的列表。
以下是 Qt 6.0 中的新模块。
以下是不在 Qt 6.0 中的 Qt 5 模块。在未来发行的 Qt 6 中可能重新引入它们。
模块 | qmake | 注释 |
---|---|---|
Qt Android Extras |
androidextras
|
见 Qt Extras 模块的变化 |
Qt Bluetooth |
bluetooth
|
|
Qt Charts |
charts
|
|
Qt Data Visualization |
datavisualization
|
|
Qt Graphical Effects | 仅 QML 类型 | |
Qt Location |
location
|
|
Qt Mac Extras |
macextras
|
见 Qt Extras 模块的变化 |
Qt Multimedia |
multimedia
|
|
Qt Multimedia Widgets |
multimediawidgets
|
|
Qt NFC |
nfc
|
|
Qt Positioning |
positioning
|
|
Qt Purchasing |
purchasing
|
|
Qt Quick Extras | 合并进 Qt Quick Controls | |
Qt Remote Objects |
remoteobjects
|
|
Qt Script |
qtscript
|
|
Qt SCXML |
scxml
|
|
Qt Script Tools |
scripttools
|
|
Qt Sensors |
sensors
|
|
Qt Serial Bus |
serialbus
|
|
Qt Serial Port |
serialport
|
|
Qt Speech |
texttospeech
|
|
Qt WebChannel |
webchannel
|
|
Qt WebEngine |
webenginecore
|
|
Qt WebSockets |
websockets
|
|
Qt WebView |
webview
|
|
Qt Windows Extras |
winextras
|
见 Qt Extras 模块的变化 |
Qt X11 Extras |
x11extras
|
见 Qt Extras 模块的变化 |
Qt XML Patterns |
xmlpatterns
|
本章节提供 Qt 6 中引入的所有新类和函数的综合列表。
namespace | QNativeInterface |
namespace | QQuickOpenGLUtils |
QList<QBluetoothUuid> | serviceUuids () const |
virtual bool | clearItemData (const QModelIndex & index ) |
virtual void | multiData (const QModelIndex & index , QModelRoleDataSpan roleDataSpan ) const |
virtual bool | clearItemData (const QModelIndex & index ) override |
类 QByteArray :
int | compare (QByteArrayView bv , Qt::CaseSensitivity cs ) const |
bool | contains (QByteArrayView bv ) const |
qsizetype | count (QByteArrayView bv ) const |
bool | endsWith (QByteArrayView bv ) const |
QByteArray | first (qsizetype n ) const |
qsizetype | indexOf (QByteArrayView bv , qsizetype from ) const |
QByteArray & | insert (qsizetype i , QByteArrayView data ) |
QByteArray | last (qsizetype n ) const |
qsizetype | lastIndexOf (QByteArrayView bv , qsizetype from ) const |
void | push_back (QByteArrayView str ) |
void | push_front (QByteArrayView str ) |
QByteArray & | replace (QByteArrayView before , QByteArrayView after ) |
QByteArray | sliced (qsizetype pos , qsizetype n ) const |
QByteArray | sliced (qsizetype pos ) const |
bool | startsWith (QByteArrayView bv ) const |
类 QBitArray :
quint32 | toUInt32 (QSysInfo::Endian endianness , bool * ok ) const |
类 QChar :
QChar | fromUcs2 (char16_t c ) |
R | fromUcs4 (char32_t c ) |
类 QDate :
QDate | fromString (QStringView string , Qt::DateFormat format ) |
QDate | fromString (QStringView string , QStringView format , QCalendar cal ) |
QDate | fromString (const QString & string , QStringView format , QCalendar cal ) |
类 QDataStream :
QDataStream & | operator<< (char16_t c ) |
QDataStream & | operator<< (char32_t c ) |
QDataStream & | operator<< (QDataStream & out , const std::pair<T1, T2> & pair ) |
QDataStream & | operator>> (char16_t & c ) |
QDataStream & | operator>> (char32_t & c ) |
QDataStream & | operator>> (QDataStream & in , std::pair<T1, T2> & pair ) |
类 QDateTime :
QDateTime | fromString (QStringView string , Qt::DateFormat format ) |
QDateTime | fromString (QStringView string , QStringView format , QCalendar cal ) |
QDateTime | fromString (const QString & string , QStringView format , QCalendar cal ) |
类 QDebug :
QDebug & | operator<< (const char16_t * t ) |
QDebug & | operator<< (QUtf8StringView s ) |
QDebug & | operator<< (QByteArrayView t ) |
QString | toString (T && object ) |
类 QDir :
void | addSearchPath (const QString & prefix , const std::filesystem::path & path ) |
std::filesystem::path | filesystemAbsolutePath () const |
std::filesystem::path | filesystemCanonicalPath () const |
std::filesystem::path | filesystemPath () const |
void | setPath (const std::filesystem::path & path ) |
类 QEvent :
virtual QEvent * | clone () const |
bool | isInputEvent () const |
bool | isPointerEvent () const |
bool | isSinglePointEvent () const |
类 QExplicitlySharedDataPointer :
T * | get () const |
void | reset (T * ptr ) |
类 QFile :
bool | copy (const std::filesystem::path & newName ) |
std::filesystem::path | filesystemFileName () const |
bool | link (const std::filesystem::path & newName ) |
QFileDevice::Permissions | permissions (const std::filesystem::path & filename ) |
bool | rename (const std::filesystem::path & newName ) |
void | setFileName (const std::filesystem::path & name ) |
bool | setPermissions (const std::filesystem::path & filename , QFileDevice::Permissions permissionSpec ) |
类 QFileInfo :
std::filesystem::path | filesystemAbsoluteFilePath () const |
std::filesystem::path | filesystemAbsolutePath () const |
std::filesystem::path | filesystemCanonicalFilePath () const |
std::filesystem::path | filesystemCanonicalPath () const |
std::filesystem::path | filesystemFilePath () const |
std::filesystem::path | filesystemPath () const |
std::filesystem::path | filesystemSymLinkTarget () const |
void | setFile (const std::filesystem::path & file ) |
void | stat () |
类 QFuture :
bool | isSuspended () const |
bool | isSuspending () const |
bool | isValid () const |
QFuture<T> | onCanceled (Function && handler ) |
QFuture<T> | onFailed (Function && handler ) |
void | setSuspended (bool suspend ) |
void | suspend () |
T | takeResult () |
QFuture<ResultType<Function> > | then (Function && function ) |
QFuture<ResultType<Function> > | then (QtFuture::Launch policy , Function && function ) |
QFuture<ResultType<Function> > | then (QThreadPool * pool , Function && function ) |
void | toggleSuspended () |
类 QFutureWatcher :
bool | isSuspended () const |
bool | isSuspending () const |
void | setSuspended (bool suspend ) |
void | suspend () |
void | suspended () |
void | suspending () |
void | toggleSuspended () |
类 QHash :
size_t | qHash (char8_t key , size_t seed ) |
size_t | qHash (char16_t key , size_t seed ) |
size_t | qHash (char32_t key , size_t seed ) |
size_t | qHash (wchar_t key , size_t seed ) |
size_t | qHash (const QByteArrayView & key , size_t seed ) |
size_t | qHash (std::nullptr_t key , size_t seed ) |
size_t | qHash (QPoint key , size_t seed ) |
size_t | qHash (const QTypeRevision & key , size_t seed ) |
size_t | qHashMulti (size_t seed , const T &... args ) |
size_t | qHashMultiCommutative (size_t seed , const T &... args ) |
类 QIODevice :
virtual qint64 | skipData (qint64 maxSize ) |
类 QJsonValue :
qint64 | toInteger (qint64 defaultValue ) const |
类 QLatin1String :
QLatin1String | first (qsizetype n ) const |
QLatin1String | last (qsizetype n ) const |
QLatin1String | sliced (qsizetype pos ) const |
QLatin1String | sliced (qsizetype pos , qsizetype n ) const |
QString | toString () const |
decltype(qTokenize(*this, std::forward<Needle>(needle), flags...)) | tokenize (Needle && sep , Flags... flags ) const |
类 QLibraryInfo :
QString | path (QLibraryInfo::LibraryPath p ) |
类 QList :
void | append (QList<T> && value ) |
QList<T> | first (qsizetype n ) const |
QList<T> | last (qsizetype n ) const |
QList<T> | operator+ (QList<T> && other ) const |
QList<T> & | operator+= (QList<T> && other ) |
QList<T> & | operator<< (QList<T> && other ) |
QList<T> | sliced (qsizetype pos , qsizetype n ) const |
QList<T> | sliced (qsizetype pos ) const |
类 QLocale :
QString | quoteString (QStringView str , QLocale::QuotationStyle style ) const |
类 QMap :
QMap::iterator | erase (QMap::const_iterator first , QMap::const_iterator last ) |
类 QMargins :
QMargins | operator| (const QMargins & m1 , const QMargins & m2 ) |
类 QMarginsF :
QMarginsF | operator| (const QMarginsF & m1 , const QMarginsF & m2 ) |
类 QMetaMethod :
QMetaType | parameterMetaType (int index ) const |
QByteArray | parameterTypeName (int index ) const |
int | relativeMethodIndex () const |
QMetaType | returnMetaType () const |
类 QMetaProperty :
QUntypedBindable | bindable (QObject * object ) const |
bool | isBindable () const |
QMetaType | metaType () const |
int | typeId () const |
类 QMetaSequence :
QMetaSequence | fromContainer () |
类 QMetaType :
qsizetype | alignOf () const |
QPartialOrdering | compare (const void * lhs , const void * rhs ) const |
bool | equals (const void * lhs , const void * rhs ) const |
bool | hasRegisteredDebugStreamOperator () const |
bool | hasRegisteredMutableViewFunction () |
bool | view (QMetaType fromType , void * from , QMetaType toType , void * to ) |
类 QModelIndex :
void | multiData (QModelRoleDataSpan roleDataSpan ) const |
类 QMultiHash :
QMultiHash<Key, T> & | unite (const QHash<Key, T> & other ) |
类 QMultiMap :
QMultiMap::iterator | erase (QMultiMap::const_iterator first , QMultiMap::const_iterator last ) |
void | multiData (QModelRoleDataSpan roleDataSpan ) const |
类 QPointer :
T * | get () const |
类 QProcess :
std::function<void ()> | childProcessModifier () const |
void | setChildProcessModifier (const std::function<void ()> & modifier ) |
void | startCommand (const QString & 命令 , QIODeviceBase::OpenMode mode ) |
类 QRect :
QRect | span (const QPoint & p1 , const QPoint & p2 ) |
QRegularExpression | fromWildcard (QStringView pattern , Qt::CaseSensitivity cs , QRegularExpression::WildcardConversionOptions options ) |
QRegularExpressionMatchIterator | globalMatch (QStringView subjectView , qsizetype offset , QRegularExpression::MatchType matchType , QRegularExpression::MatchOptions matchOptions ) const |
QRegularExpressionMatch | match (QStringView subjectView , qsizetype offset , QRegularExpression::MatchType matchType , QRegularExpression::MatchOptions matchOptions ) const |
T * | get () |
const T * | get () const |
void | reset (T * ptr ) |
T * | take () |
void | autoAcceptChildRowsChanged (bool autoAcceptChildRows ) |
void | invalidateColumnsFilter () |
void | invalidateRowsFilter () |
类 QString :
qsizetype | count (QStringView str , Qt::CaseSensitivity cs ) const |
QString | first (qsizetype n ) const |
QString | fromLatin1 (QByteArrayView str ) |
QString | fromLocal8Bit (QByteArrayView str ) |
QString | fromUtf8 (QByteArrayView str ) |
QString | fromUtf8 (const char8_t * str , qsizetype size ) |
QString & | insert (qsizetype position , QStringView str ) |
QString | last (qsizetype n ) const |
int | localeAwareCompare (QStringView other ) const |
int | localeAwareCompare (QStringView s1 , QStringView s2 ) |
QString & | operator+= (QStringView str ) |
QString & | prepend (QStringView str ) |
QString | sliced (qsizetype pos , qsizetype n ) const |
QString | sliced (qsizetype pos ) const |
decltype(qTokenize(*this, std::forward<Needle>(needle), flags...)) | tokenize (Needle && sep , Flags... flags ) const & |
decltype(qTokenize(std::move(*this), std::forward<Needle>(needle), flags...)) | tokenize (Needle && sep , Flags... flags ) && |
类 QStringListModel :
virtual bool | clearItemData (const QModelIndex & index ) override |
类 QStringTokenizer :
decltype(QtPrivate::Tok::TokenizerResult<Haystack, Needle>({std::forward<Haystack>(h), std::forward<Needle>(n), flags...})) | qTokenize (Haystack && haystack , Needle && needle , Flags... flags ) |
类 QStringView :
QStringView::const_pointer | constData () const |
qsizetype | count (QChar ch , Qt::CaseSensitivity cs ) const |
qsizetype | count (QStringView str , Qt::CaseSensitivity cs ) const |
QStringView | first (qsizetype n ) const |
QStringView | last (qsizetype n ) const |
QStringView | sliced (qsizetype pos , qsizetype n ) const |
QStringView | sliced (qsizetype pos ) const |
QList<QStringView> | split (QStringView sep , Qt::SplitBehavior behavior , Qt::CaseSensitivity cs ) const |
QList<QStringView> | split (QChar sep , Qt::SplitBehavior behavior , Qt::CaseSensitivity cs ) const |
QList<QStringView> | split (const QRegularExpression & re , Qt::SplitBehavior behavior ) const |
CFStringRef | toCFString () const |
double | toDouble (bool * ok ) const |
float | toFloat (bool * ok ) const |
int | toInt (bool * ok , int base ) const |
long | toLong (bool * ok , int base ) const |
qlonglong | toLongLong (bool * ok , int base ) const |
NSString * | toNSString () const |
short | toShort (bool * ok , int base ) const |
uint | toUInt (bool * ok , int base ) const |
ulong | toULong (bool * ok , int base ) const |
qulonglong | toULongLong (bool * ok , int base ) const |
ushort | toUShort (bool * ok , int base ) const |
decltype(qTokenize(*this, std::forward<Needle>(needle), flags...)) | tokenize (Needle && sep , Flags... flags ) const |
类 QThreadPool :
bool | contains (const QThread * thread ) const |
类 QTime :
QTime | fromString (QStringView string , Qt::DateFormat format ) |
QTime | fromString (QStringView string , QStringView format ) |
QTime | fromString (const QString & string , QStringView format ) |
类 QTypeRevision :
QDataStream & | operator<< (QDataStream & out , const QTypeRevision & revision ) |
QDataStream & | operator>> (QDataStream & in , QTypeRevision & revision ) |
std::exception_ptr | exception () const |
void | swap (QUnhandledException & other ) |
类 QVariant :
bool | canConvert (QMetaType type ) const |
QPartialOrdering | compare (const QVariant & lhs , const QVariant & rhs ) |
bool | convert (QMetaType targetType ) |
QMetaType | metaType () const |
类 QVarLengthArray :
QVarLengthArray<T, Prealloc> & | operator= (QVarLengthArray<T, Prealloc> && other ) |
类 QAction :
QList<QObject *> | associatedObjects () const |
类 QIcon :
QPixmap | pixmap (const QSize & size , qreal devicePixelRatio , QIcon::Mode mode , QIcon::State state ) const |
类 QImage :
QImage | convertedTo (QImage::Format format , Qt::ImageConversionFlags flags ) const & |
QImage | convertedTo (QImage::Format format , Qt::ImageConversionFlags flags ) && |
QImage | fromHBITMAP (HBITMAP hbitmap ) |
QImage | fromHICON (HICON icon ) |
void | mirror (bool horizontal , bool vertical ) |
void | rgbSwap () |
HBITMAP | toHBITMAP () const |
HICON | toHICON (const QImage & mask ) const |
类 QImageIOHandler :
bool | allocateImage (QSize size , QImage::Format format , QImage * image ) |
类 QImageReader :
int | allocationLimit () |
void | setAllocationLimit (int mbLimit ) |
类 QInputEvent :
const QInputDevice * | device () const |
类 QKeyEvent :
QKeyCombination | keyCombination () const |
QPageRanges | pageRanges () const |
virtual void | setPageRanges (const QPageRanges & ranges ) |
类 QRegion :
QRegion | fromHRGN (HRGN hrgn ) |
HRGN | toHRGN () const |
类 QShortcut :
QList<QKeySequence> | keys () const |
void | setKeys (QKeySequence::StandardKey key ) |
void | setKeys (const QList<QKeySequence> & keys ) |
类 QStandardItem :
virtual void | multiData (QModelRoleDataSpan roleDataSpan ) const |
类 QSurfaceFormat :
void | setColorSpace (const QColorSpace & colorSpace ) |
类 QTextCharFormat :
qreal | baselineOffset () const |
void | setBaselineOffset (qreal baseline ) |
void | setSubScriptBaseline (qreal baseline ) |
void | setSuperScriptBaseline (qreal baseline ) |
qreal | subScriptBaseline () const |
qreal | superScriptBaseline () const |
类 QTextDocument :
qreal | baselineOffset () const |
void | setBaselineOffset (qreal baseline ) |
void | setSubScriptBaseline (qreal baseline ) |
void | setSuperScriptBaseline (qreal baseline ) |
qreal | subScriptBaseline () const |
qreal | superScriptBaseline () const |
类 QWindow :
QPointF | mapFromGlobal (const QPointF & pos ) const |
QPointF | mapToGlobal (const QPointF & pos ) const |
virtual void | paintEvent (QPaintEvent * ev ) |
bool | handshakeMustInterruptOnError () const |
bool | missingCertificateIsFatal () const |
void | setCiphers (const QString & ciphers ) |
void | setHandshakeMustInterruptOnError (bool interrupt ) |
void | setMissingCertificateIsFatal (bool cannotRecover ) |
类 QSslSocket :
void | continueInterruptedHandshake () |
void | setExtraFileSelectors (const QStringList & extraFileSelectors ) |
类 QSGMetalTexture :
QSGTexture * | fromNative (int texture , QQuickWindow * window , const QSize & size , QQuickWindow::CreateTextureOptions options ) |
类 QSGD3D11Texture :
QSGTexture * | fromNative (void * texture , QQuickWindow * window , const QSize & size , QQuickWindow::CreateTextureOptions options ) |
类 QSGOpenGLTexture :
QSGTexture * | fromNative (GLuint textureId , QQuickWindow * window , const QSize & size , QQuickWindow::CreateTextureOptions options ) |
类 QSGVulkanTexture :
QSGTexture * | fromNative (VkImage image , VkImageLayout layout , QQuickWindow * window , const QSize & size , QQuickWindow::CreateTextureOptions options ) |
类 QQuickItem :
virtual void | geometryChange (const QRectF & newGeometry , const QRectF & oldGeometry ) |
void | beginFrame () |
void | endFrame () |
bool | initialize () |
int | samples () const |
void | setSamples (int sampleCount ) |
QQuickWindow * | window () const |
类 QQuickWindow :
void | afterFrameEnd () |
void | beforeFrameBegin () |
QSGRendererInterface::GraphicsApi | graphicsApi () |
QQuickGraphicsConfiguration | graphicsConfiguration () const |
QQuickGraphicsDevice | graphicsDevice () const |
QQuickRenderTarget | renderTarget () const |
void | setGraphicsConfiguration (const QQuickGraphicsConfiguration & config ) |
void | setGraphicsDevice (const QQuickGraphicsDevice & device ) |
void | setRenderTarget (const QQuickRenderTarget & target ) |
类 QSGRenderNode :
virtual void | prepare () |
QString | alias () const |
类 QModbusReply :
QList<QModbusDevice::IntermediateError> | intermediateErrors () const |
类 QSqlDriver :
virtual int | maximumIdentifierLength (QSqlDriver::IdentifierType type ) const |
类 QSqlQuery :
QVariantList | boundValues () const |
virtual void | initViewItemOption (QStyleOptionViewItem * option ) const |
virtual QAbstractItemDelegate * | itemDelegateForIndex (const QModelIndex & index ) const |
virtual bool | isEmpty () const |
类 QHeaderView :
virtual void | initStyleOptionForIndex (QStyleOptionHeader * option , int logicalIndex ) const |
类 QLabel :
QPicture | picture () const |
类 QWidget :
QPointF | mapFrom (const QWidget * parent , const QPointF & pos ) const |
QPointF | mapFromGlobal (const QPointF & pos ) const |
QPointF | mapFromParent (const QPointF & pos ) const |
QPointF | mapTo (const QWidget * parent , const QPointF & pos ) const |
QPointF | mapToGlobal (const QPointF & pos ) const |
QPointF | mapToParent (const QPointF & pos ) const |
void | resetOpenGLState () |
QTaskBuilder<Task> | task (Task && task ) |
long double | qDegreesToRadians (long double degrees ) |
long double | qRadiansToDegrees (long double radians ) |
QT_IMPLICIT_QCHAR_CONSTRUCTION | |
QT_IMPLICIT_QFILEINFO_CONSTRUCTION | |
Q_MOC_INCLUDE | |
Q_OBJECT_BINDABLE_PROPERTY ( containingClass , type , name , signal ) | |
Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS ( containingClass , type , name , initialvalue , signal ) |
enum | IntermediateError { ResponseCrcError, ResponseRequestMismatch } |
enum | WildcardConversionOption { DefaultWildcardConversion, UnanchoredWildcardConversion } |
enum class | AlertLevel { Warning, Fatal, Unknown } |
enum class | AlertType { CloseNotify, UnexpectedMessage, BadRecordMac, RecordOverflow, DecompressionFailure, …, UnknownAlertMessage } |
enum class | Launch { Sync, Async, Inherit } |
iterator | |
QPair | |
iterator |
MacOSBigSur |
additionalShmFormats | |
font | |
palette | |
palette | |
sortIndex | |
tonemapMode |