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 )

新枚举类型

enum class 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 发行的补充