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 發行的補充