Qt 5.11 的新类和新函数

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

新类

A
QAbstractItemModelTester
QAbstractRayCaster ( Qt3DRender )
C
QCustomAudioRoleControl
F
FilterRequest ( QWebEngineCookieStore )
G
QGeoServiceProviderFactoryV2
K
QKnxUtf8
QKnxUtf8String
QKnxVarString
QKnxVarString88591
P
PropertyPair ( QQmlContext )
QPdfPageRenderer
R
QRayCaster ( Qt3DRender )
QRayCasterHit ( Qt3DRender )
S
QScreenRayCaster ( Qt3DRender )
W
QWebEngineQuotaRequest
QWebEngineRegisterProtocolHandlerRequest

新成员函数

类 QTransform :

QQuaternion fromAxes (const QVector3D & xAxis , const QVector3D & yAxis , const QVector3D & zAxis )
QMatrix4x4 rotateFromAxes (const QVector3D & xAxis , const QVector3D & yAxis , const QVector3D & zAxis )

类 QAbstractItemModel :

bool checkIndex (const QModelIndex & index , QAbstractItemModel::CheckIndexOptions options ) const

类 QBitArray :

const char * bits () const
QBitArray fromBits (const char * data , qsizetype size )

类 QModelIndex :

QModelIndex siblingAtColumn (int column ) const
QModelIndex siblingAtRow (int row ) const

类 QScopedPointer :

T * get () const

类 QSharedPointer :

T * get () const

类 QString :

QString & remove (QLatin1String str , Qt::CaseSensitivity cs )

类 QStringView :

bool isRightToLeft () const

类 QSysInfo :

QByteArray bootUniqueId ()
QByteArray machineUniqueId ()

类 QUuid :

QByteArray toByteArray (QUuid::StringFormat mode ) const
QString toString (QUuid::StringFormat mode ) const

类 QVarLengthArray :

QVarLengthArray<T, Prealloc> & operator+= (T && value )
QVarLengthArray<T, Prealloc> & operator<< (T && value )

类 QVariant :

QVariant fromStdVariant (const std::variant<Types...> & value )

类 QVector :

QVector<T> & operator+= (T && value )
QVector<T> & operator<< (T && value )

类 qfloat16 :

void qFloatFromFloat16 (float * out , const qfloat16 * in , qsizetype len )
void qFloatToFloat16 (qfloat16 * out , const float * in , qsizetype len )

类 QGamepadManager :

QString gamepadName (int deviceId ) const

类 QFontMetrics :

int horizontalAdvance (const QString & text , int len ) const
int horizontalAdvance (QChar ch ) const

类 QFontMetricsF :

qreal horizontalAdvance (const QString & text , int length ) const
qreal horizontalAdvance (QChar ch ) const

类 QGuiApplication :

void fontChanged (const QFont & font )

类 QIcon :

QStringList fallbackSearchPaths ()
void setFallbackSearchPaths (const QStringList & paths )

类 QGeoRouteRequest :

QVariantMap extraParameters () const
void setExtraParameters (const QVariantMap & extraParameters )

类 QMediaPlayer :

void customAudioRoleChanged (const QString & role )
QStringList supportedCustomAudioRoles () const

类 QVideoSurfaceFormat :

bool isMirrored () const
void setMirrored (bool mirrored )

类 QHostAddress :

bool isBroadcast () const
bool isGlobal () const
bool isLinkLocal () const
bool isSiteLocal () const
bool isUniqueLocalUnicast () const

类 QNetworkAddressEntry :

void clearAddressLifetime ()
QNetworkAddressEntry::DnsEligibilityStatus dnsEligibility () const
bool isLifetimeKnown () const
bool isPermanent () const
bool isTemporary () const
QDeadlineTimer preferredLifetime () const
void setAddressLifetime (QDeadlineTimer preferred , QDeadlineTimer validity )
void setDnsEligibility (QNetworkAddressEntry::DnsEligibilityStatus status )
QDeadlineTimer validityLifetime () const

类 QNetworkInterface :

int maximumTransmissionUnit () const
QNetworkInterface::InterfaceType type () const

类 QSslConfiguration :

QMap<QByteArray, QVariant> backendConfiguration () const
void setBackendConfiguration (const QMap<QByteArray, QVariant> & backendConfiguration )
void setBackendConfigurationOption (const QByteArray & name , const QVariant & value )

类 QQmlContext :

void setContextProperties (const QVector<QQmlContext::PropertyPair> & properties )

类 QRemoteObjectHostBase :

bool proxy (const QUrl & registryUrl , const QUrl & hostUrl , QRemoteObjectHostBase::RemoteObjectNameFilter filter )
bool reverseProxy (QRemoteObjectHostBase::RemoteObjectNameFilter filter )

类 QCanBusDeviceInfo :

int channel () const
QString description () const
QString serialNumber () const

类 QWebEngineCookieStore :

void setCookieFilter (const std::function<bool (const FilterRequest &)> & filterCallback )
void setCookieFilter (std::function<bool (const FilterRequest &)> && filterCallback )

类 QWebEngineUrlRequestJob :

QUrl initiator () const

类 QMenuBar :

QAction * addAction (const QString & text , const Obj * receiver , PointerToMemberFunctionOrFunctor method )
QAction * addAction (const QString & text , Functor functor )

名称空间中的新函数

char * toString (const QVector4D & v )
char * toString (const QVector3D & v )
char * toString (const QVector2D & v )
char * toString (const QUuid & uuid )
char * toString (const QStringView & string )
char * toString (const std::pair<T1, T2> & pair )
char * toString (const QPair<T1, T2> & pair )

新全局函数

void qFloatFromFloat16 (float * out , const qfloat16 * in , qsizetype len )
void qFloatToFloat16 (qfloat16 * out , const float * in , qsizetype len )

新枚举类型

枚举类 CheckIndexOption { NoOption, IndexIsValid, DoNotUseParent, ParentIsInvalid }
enum DnsEligibilityStatus { DnsEligibilityUnknown, DnsIneligible, DnsEligible }
enum StringFormat { WithBraces, WithoutBraces, Id128 }

新类型别名

(alias) const_reference

新特性

新 QML 类型

A
AbstractRayCaster
R
RayCaster
S
ScreenRayCaster

新 QML 特性

containmentMask
customAudioRole
customAudioRole
customAudioRole
extraParameters
flags
isAvailable
routeQuery
status
supportedColorFilters
supportedExposureModes
supportedFocusModes
supportedWhiteBalanceModes

新 QML 信号

doubleTapped ()
singleTapped ()

新 QML 方法

segmentsCount ()

其它 Qt 5 发行的补充