Qt 5.6 中的新类和函数

This page contains a comprehensive list of all new classes and functions introduced in Qt 5.6. Links to new APIs in previous Qt 5 releases are found at the bottom of this page.

新类

A
QAbstractLight ( Qt3DRender )
QAbstractPhysicalDevice ( Qt3DInput )
QAudioRoleControl
G
QGeoCodeReply
QGeoCodingManager
QGeoCodingManagerEngine
QGeoManeuver
QGeoRoute
QGeoRouteReply
QGeoRouteRequest
QGeoRouteSegment
QGeoRoutingManager
QGeoRoutingManagerEngine
QGeoServiceProvider
QGeoServiceProviderFactory
K
key_iterator ( QMap )
key_iterator ( QHash )
L
QLogicalDevice ( Qt3DInput )
O
QObjectPicker ( Qt3DRender )
QOpenGLExtraFunctions
P
QPlace
QPlaceAttribute
QPlaceCategory
QPlaceContent
QPlaceContentReply
QPlaceContentRequest
QPlaceDetailsReply
QPlaceEditorial
QPlaceIcon
QPlaceIdReply
QPlaceImage
QPlaceManager
QPlaceManagerEngine
QPlaceMatchReply
QPlaceMatchRequest
QPlaceRatings
QPlaceReply
QPlaceResult
QPlaceReview
QPlaceSearchReply
QPlaceSearchRequest
QPlaceSearchResult
QPlaceSearchSuggestionReply
QPlaceSupplier
QPlaceUser
Q
QQuickAsyncImageProvider
QQuickImageResponse
QQuickWebEngineProfile
R
QRgba64
T
QTransform ( Qt3DCore )
V
QVersionNumber
W
QWebEngineCookieStore
QWebEngineUrlRequestInfo
QWebEngineUrlRequestInterceptor
QWebEngineUrlRequestJob
QWebEngineUrlSchemeHandler

新成员函数

QBluetoothSocket :

QBluetooth::SecurityFlags preferredSecurityFlags () const
void setPreferredSecurityFlags (QBluetooth::SecurityFlags flags )

QByteArray :

QByteArray::const_reverse_iterator crbegin () const
QByteArray::const_reverse_iterator crend () const
QByteArray::reverse_iterator rbegin ()
QByteArray::const_reverse_iterator rbegin () const
QByteArray::reverse_iterator rend ()
QByteArray::const_reverse_iterator rend () const

FromBase64Result :

uint qHash (const QVector<T> & key , uint seed )
uint qHash (const QList<T> & key , uint seed )
uint qHash (const QRegExp & key , uint seed )
uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )

QChar :

bool operator< (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator< (const QList<T> & lhs , const QList<T> & rhs )
bool operator< (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator<= (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator<= (const QList<T> & lhs , const QList<T> & rhs )
bool operator<= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator> (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator> (const QList<T> & lhs , const QList<T> & rhs )
bool operator> (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator>= (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator>= (const QList<T> & lhs , const QList<T> & rhs )
bool operator>= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )

QCommandLineParser :

void setOptionsAfterPositionalArgumentsMode (QCommandLineParser::OptionsAfterPositionalArgumentsMode parsingMode )

QDebug :

void setVerbosity (int verbosityLevel )
int verbosity () const

QDir :

QChar listSeparator ()

QHash :

QHash::key_iterator keyBegin () const
QHash::key_iterator keyEnd () const
int qGlobalQHashSeed ()
uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )
void qSetGlobalQHashSeed (int newSeed )

QHistoryState :

QAbstractTransition * defaultTransition () const
void defaultTransitionChanged ()
void setDefaultTransition (QAbstractTransition * transition )

QItemSelectionRange :

void swap (QItemSelectionRange & other )

QLinkedList :

QLinkedList::const_reverse_iterator crbegin () const
QLinkedList::const_reverse_iterator crend () const
QLinkedList::reverse_iterator rbegin ()
QLinkedList::const_reverse_iterator rbegin () const
QLinkedList::reverse_iterator rend ()
QLinkedList::const_reverse_iterator rend () const

QList :

const T & constFirst () const
const T & constLast () const
QList::const_reverse_iterator crbegin () const
QList::const_reverse_iterator crend () const
bool operator< (const QList<T> & lhs , const QList<T> & rhs )
bool operator< (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator<= (const QList<T> & lhs , const QList<T> & rhs )
bool operator<= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator> (const QList<T> & lhs , const QList<T> & rhs )
bool operator> (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator>= (const QList<T> & lhs , const QList<T> & rhs )
bool operator>= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
uint qHash (const QList<T> & key , uint seed )
uint qHash (const QRegExp & key , uint seed )
uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )
QList::reverse_iterator rbegin ()
QList::const_reverse_iterator rbegin () const
QList::reverse_iterator rend ()
QList::const_reverse_iterator rend () const

QLocale :

uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )
void swap (QLocale & other )

QMap :

QPair<QMap::const_iterator, QMap::const_iterator> equal_range (const Key & key ) const
QMap::key_iterator keyBegin () const
QMap::key_iterator keyEnd () const

QMimeType :

uint qHash (const QMimeType & key , uint seed )

QMultiHash :

uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )

QPair :

bool operator< (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator< (const QList<T> & lhs , const QList<T> & rhs )
bool operator< (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator<= (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator<= (const QList<T> & lhs , const QList<T> & rhs )
bool operator<= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator> (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator> (const QList<T> & lhs , const QList<T> & rhs )
bool operator> (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator>= (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator>= (const QList<T> & lhs , const QList<T> & rhs )
bool operator>= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )

QPersistentModelIndex :

uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )

QPointer :

void swap (QPointer<T> & other )

QProcess :

void errorOccurred (QProcess::ProcessError error )

QRegularExpression :

uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )

QRegExp :

uint qHash (const QRegExp & key , uint seed )
uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )

QSet :

bool intersects (const QSet<T> & other ) const

QSharedPointer :

QSharedPointer<T> & operator= (QSharedPointer<X> && other )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )

QStorageInfo :

int blockSize () const

QString :

QString::const_reverse_iterator crbegin () const
QString::const_reverse_iterator crend () const
QString::reverse_iterator rbegin ()
QString::const_reverse_iterator rbegin () const
QString::reverse_iterator rend ()
QString::const_reverse_iterator rend () const

QStringRef :

void truncate (int position )

QStringView :

uint qHash (const QVector<T> & key , uint seed )
uint qHash (const QList<T> & key , uint seed )
uint qHash (const QRegExp & key , uint seed )
uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )

QSysInfo :

QString machineHostName ()

QTemporaryDir :

QString errorString () const

QTextStream :

QTextStream & operator<< (const QStringRef & string )

QUrlQuery :

uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )

QUuid :

uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )

QVarLengthArray :

QVarLengthArray::const_reverse_iterator crbegin () const
QVarLengthArray::const_reverse_iterator crend () const
bool operator< (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator<= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator> (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator>= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )
QVarLengthArray::reverse_iterator rbegin ()
QVarLengthArray::const_reverse_iterator rbegin () const
QVarLengthArray::reverse_iterator rend ()
QVarLengthArray::const_reverse_iterator rend () const

QVector :

void append (T && value )
const T & constFirst () const
const T & constLast () const
QVector::const_reverse_iterator crbegin () const
QVector::const_reverse_iterator crend () const
void move (int from , int to )
bool operator< (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator< (const QList<T> & lhs , const QList<T> & rhs )
bool operator< (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator<= (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator<= (const QList<T> & lhs , const QList<T> & rhs )
bool operator<= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator> (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator> (const QList<T> & lhs , const QList<T> & rhs )
bool operator> (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator>= (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator>= (const QList<T> & lhs , const QList<T> & rhs )
bool operator>= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
void push_back (T && value )
uint qHash (const QVector<T> & key , uint seed )
uint qHash (const QList<T> & key , uint seed )
uint qHash (const QRegExp & key , uint seed )
uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QMimeType & key , uint seed )
QVector::reverse_iterator rbegin ()
QVector::const_reverse_iterator rbegin () const
QVector::reverse_iterator rend ()
QVector::const_reverse_iterator rend () const

QXmlStreamStringRef :

void swap (QXmlStreamStringRef & other )

QDBusMessage :

QDBusMessage createTargetedSignal (const QString & service , const QString & path , const QString & interface , const QString & name )

QColor :

QColor fromRgba64 (ushort r , ushort g , ushort b , ushort a )
QColor fromRgba64 (QRgba64 rgba64 )
uint qAlpha (QRgba64 rgba64 )
uint qBlue (QRgba64 rgba64 )
uint qGreen (QRgba64 rgba64 )
QRgba64 qPremultiply (QRgba64 rgba64 )
uint qRed (QRgba64 rgba64 )
QRgba64 qRgba64 (quint16 r , quint16 g , quint16 b , quint16 a )
QRgba64 qRgba64 (quint64 c )
QRgba64 qUnpremultiply (QRgba64 rgba64 )
QRgba64 rgba64 () const
void setRgba64 (QRgba64 rgba )

QFont :

uint qHash (const QMatrix & key , uint seed )
uint qHash (const QTransform & key , uint seed )

QGuiApplication :

bool isFallbackSessionManagementEnabled ()
void setFallbackSessionManagementEnabled (bool enabled )

QIcon :

bool isMask () const
void setIsMask (bool isMask )

QImage :

QColor pixelColor (const QPoint & position ) const
QColor pixelColor (int x , int y ) const
void setPixelColor (const QPoint & position , const QColor & color )
void setPixelColor (int x , int y , const QColor & color )

QMatrix :

uint qHash (const QMatrix & key , uint seed )
uint qHash (const QTransform & key , uint seed )

QOpenGLFramebufferObject :

void addColorAttachment (const QSize & size , GLenum internalFormat )
void addColorAttachment (int width , int height , GLenum internalFormat )
QVector<QSize> sizes () const
GLuint takeTexture (int colorAttachmentIndex )
QVector<GLuint> textures () const
QImage toImage (bool flipped , int colorAttachmentIndex ) const

QPaintDevice :

qreal devicePixelRatioF () const

QPointingDeviceUniqueId :

uint qHash (const QMatrix & key , uint seed )
uint qHash (const QTransform & key , uint seed )

QRhiVertexInputBinding :

uint qHash (const QMatrix & key , uint seed )
uint qHash (const QTransform & key , uint seed )

QShaderKey :

uint qHash (const QMatrix & key , uint seed )
uint qHash (const QTransform & key , uint seed )

QStandardItem :

bool isAutoTristate () const
bool isUserTristate () const
void setAutoTristate (bool tristate )
void setUserTristate (bool tristate )

QTextLayout :

void clearFormats ()
QVector<QTextLayout::FormatRange> formats () const
void setFormats (const QVector<QTextLayout::FormatRange> & 格式 )

QTransform :

uint qHash (const QTransform & key , uint seed )

QMediaPlayer :

void audioRoleChanged (QAudio::Role role )
QList<QAudio::Role> supportedAudioRoles () const

QHostAddress :

bool isMulticast () const
void swap (QHostAddress & other )

QNetworkReply :

void redirected (const QUrl & url )

QNetworkRequest :

int maximumRedirectsAllowed () const
void setMaximumRedirectsAllowed (int maxRedirectsAllowed )

QWindowsWindowFunctions :

void setHasBorderInFullScreen (QWindow * window , bool border )
const QByteArray setHasBorderInFullScreenIdentifier ()

QJSEngine :

void installExtensions (QJSEngine::Extensions extensions , const QJSValue & object )

QQmlDebuggingEnabler :

bool connectToLocalDebugger (const QString & socketFileName , QQmlDebuggingEnabler::StartMode mode )

QQuickTextureFactory :

QQuickTextureFactory * textureFactoryForImage (const QImage & image )

QWebSocket :

void open (const QNetworkRequest & request )
QNetworkRequest request () const

QMainWindow :

void resizeDocks (const QList<QDockWidget *> & docks , const QList<int> & sizes , Qt::Orientation orientation )

QMenu :

QAction * addAction (const QString & text , Functor functor , const QKeySequence & shortcut )
QAction * addAction (const QString & text , const QObject * context , Functor functor , const QKeySequence & shortcut )
QAction * addAction (const QIcon & icon , const QString & text , Functor functor , const QKeySequence & shortcut )
QAction * addAction (const QIcon & icon , const QString & text , const QObject * context , Functor functor , const QKeySequence & shortcut )

QSizePolicy :

uint qHash (QSizePolicy key , uint seed )

QToolBar :

QAction * addAction (const QString & text , Functor functor )
QAction * addAction (const QString & text , const QObject * context , Functor functor )
QAction * addAction (const QIcon & icon , const QString & text , Functor functor )
QAction * addAction (const QIcon & icon , const QString & text , const QObject * context , Functor functor )

新全局函数

bool operator< (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator< (const QList<T> & lhs , const QList<T> & rhs )
bool operator< (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator<= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator<= (const QList<T> & lhs , const QList<T> & rhs )
bool operator<= (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator> (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator> (const QList<T> & lhs , const QList<T> & rhs )
bool operator> (const QVector<T> & lhs , const QVector<T> & rhs )
bool operator>= (const QVarLengthArray<T, Prealloc1> & lhs , const QVarLengthArray<T, Prealloc2> & rhs )
bool operator>= (const QList<T> & lhs , const QList<T> & rhs )
bool operator>= (const QVector<T> & lhs , const QVector<T> & rhs )
uint qAlpha (QRgba64 rgba64 )
uint qBlue (QRgba64 rgba64 )
uint qCountLeadingZeroBits (quint64 v )
uint qCountLeadingZeroBits (quint16 v )
uint qCountLeadingZeroBits (quint8 v )
uint qCountLeadingZeroBits (quint64 v )
uint qCountLeadingZeroBits (quint16 v )
uint qCountLeadingZeroBits (quint8 v )
uint qCountLeadingZeroBits (quint32 v )
uint qCountTrailingZeroBits (quint64 v )
uint qCountTrailingZeroBits (quint16 v )
uint qCountTrailingZeroBits (quint32 v )
uint qCountTrailingZeroBits (quint8 v )
uint qCountTrailingZeroBits (quint64 v )
uint qCountTrailingZeroBits (quint16 v )
uint qCountTrailingZeroBits (quint32 v )
uint qCountTrailingZeroBits (quint8 v )
int qGlobalQHashSeed ()
uint qGreen (QRgba64 rgba64 )
uint qHash (QSizePolicy key , uint seed )
uint qHash (const QTransform & key , uint seed )
uint qHash (const QMatrix & key , uint seed )
uint qHash (const QKeySequence & key , uint seed )
uint qHash (const QMimeType & key , uint seed )
uint qHash (const QVersionNumber & key , uint seed )
uint qHash (const QUrlQuery & key , uint seed )
uint qHash (const QRegularExpression & key , uint seed )
uint qHash (const QLocale & key , uint seed )
uint qHash (const QRegExp & key , uint seed )
uint qHash (const QList<T> & key , uint seed )
uint qHash (const QVector<T> & key , uint seed )
QRgba64 qPremultiply (QRgba64 rgba64 )
uint qRed (QRgba64 rgba64 )
QRgba64 qRgba64 (quint64 c )
QRgba64 qRgba64 (quint16 r , quint16 g , quint16 b , quint16 a )
void qSetGlobalQHashSeed (int newSeed )
QRgba64 qUnpremultiply (QRgba64 rgba64 )

新宏

QTRY_VERIFY2 ( 条件 , message )
QTRY_VERIFY2 ( 条件 , message )
QTRY_VERIFY2_WITH_TIMEOUT ( 条件 , message , timeout )
QTRY_VERIFY2_WITH_TIMEOUT ( 条件 , message , timeout )
QT_NO_PROCESS_COMBINED_ARGUMENT_START
QT_NO_PROCESS_COMBINED_ARGUMENT_START

新枚举类型

enum Role { UnknownRole, MusicRole, VideoRole, VoiceCommunicationRole, AlarmRole, …, CustomRole }
enum OptionsAfterPositionalArgumentsMode { ParseAsOptions, ParseAsPositionalArguments }
enum EnterKeyType { EnterKeyDefault, EnterKeyReturn, EnterKeyDone, EnterKeyGo, EnterKeySend, …, EnterKeyPrevious }

新类型别名

typedef const_reverse_iterator
typedef reverse_iterator
typedef const_reverse_iterator
typedef reverse_iterator
typedef const_reverse_iterator
typedef reverse_iterator
(obsolete) typedef const_reverse_iterator
(obsolete) typedef reverse_iterator
typedef const_reverse_iterator
typedef reverse_iterator
typedef const_reverse_iterator
typedef reverse_iterator
typedef const_reverse_iterator
typedef reverse_iterator

新特性

新 QML 类型

A
AbstractPhysicalDevice
E
EnterKey
L
Light
LogicalDevice
P
Playlist
PlaylistItem
Q
QuaternionAnimation
T
Transform

新 QML 特性

audioRole
audioRole
audioRole
bottomPadding
bottomPadding
bottomPadding
bottomPadding
bottomPadding
bottomPadding
bottomPadding
color
font.styleName
font.styleName
font.styleName
layer.textureMirroring
leftPadding
leftPadding
leftPadding
leftPadding
leftPadding
leftPadding
leftPadding
nativeText
padding
padding
padding
padding
padding
padding
padding
playlist
playlist
playlist
portableText
rightPadding
rightPadding
rightPadding
rightPadding
rightPadding
rightPadding
rightPadding
textureMirroring
topPadding
topPadding
topPadding
topPadding
topPadding
topPadding
topPadding
visibleRegion

新 QML 信号

editingFinished ()

新 QML 方法

append ()
clear ()
get ()
indexOf ()
insert ()
move ()
remove ()
supportedAudioRoles ()
supportedAudioRoles ()
supportedAudioRoles ()

其它 Qt 5 发行的补充