Qt 5.13 中的新类和函数

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

新名称空间

namespace Manufacturers
namespace Ets

新类

C
QCompressedHelpInfo
QConcatenateTablesProxyModel
G
QGeoJson
H
QHelpFilterData
QHelpFilterEngine
K
QKnxNetIpSecureConfiguration
QKnxSecureKey
M
QModbusTcpConnectionObserver
O
QOcspResponse
S
QSetFence ( Qt3DRender )
QSharedGLTexture ( Qt3DRender )
T
QTransposeProxyModel
W
QWaitFence ( Qt3DRender )
QWaylandViewporter
QWaylandWlScaler
QWebEngineClientCertificateStore
QWebEngineNotification

新成员函数

QAxBase :

unsigned long classContext () const
void setClassContext (unsigned long classContext )

QAxSelect :

QAxSelect::SandboxingLevel sandboxingLevel () const

QAbstractTexture :

QVariant handle () const
Qt3DRender::QAbstractTexture::HandleType handleType () const

QObjectPicker :

void setPriority (int priority )

QBluetoothDeviceInfo :

void setServiceUuids (const QVector<QBluetoothUuid> & uuids )

QAbstractAxis :

bool labelsEditable () const
void labelsEditableChanged (bool editable )
void setLabelsEditable (bool editable )

QByteArrayList :

int indexOf (const char * needle , int from ) const

QCollator :

int compare (QStringView s1 , QStringView s2 ) const

QDebug :

QDebug & verbosity (int verbosityLevel )

QList :

void swapItemsAt (int i , int j )

QLocale :

QLocale collation () const
long toLong (const QString & s , bool * ok ) const
long toLong (const QStringRef & s , bool * ok ) const
long toLong (QStringView s , bool * ok ) const
ulong toULong (const QString & s , bool * ok ) const
ulong toULong (const QStringRef & s , bool * ok ) const
ulong toULong (QStringView s , bool * ok ) const

QMetaType :

int id () const

QMultiHash :

QList<Key> uniqueKeys () const
QMultiHash<K, V> & unite (const QMultiHash<K, V> & other )

QResource :

QResource::Compression compressionAlgorithm () const

QStringListModel :

virtual QMap<int, QVariant> itemData (const QModelIndex & index ) const override
virtual bool moveRows (const QModelIndex & sourceParent , int sourceRow , int count , const QModelIndex & destinationParent , int destinationChild ) override
virtual bool setItemData (const QModelIndex & index , const QMap<int, QVariant> & roles ) override

QStringList :

int indexOf (QStringView str , int from ) const
int indexOf (QLatin1String str , int from ) const
int lastIndexOf (QStringView str , int from ) const
int lastIndexOf (QLatin1String str , int from ) const

QFont :

QStringList families () const
void setFamilies (const QStringList & families )

QImage :

void convertTo (QImage::Format format , Qt::ImageConversionFlags flags )

QPainterPath :

int capacity () const
void clear ()
void reserve (int size )

QTextCharFormat :

QVariant fontFamilies () const
QVariant fontStyleName () const
void setFontFamilies (const QStringList & families )
void setFontStyleName (const QString & styleName )

QHelpEngineCore :

QHelpFilterEngine * filterEngine () const
void setUsesFilterEngine (bool 使用 )
bool usesFilterEngine () const

QKnxNetIpEndpointConnection :

void connectToHostEncrypted (const QKnxNetIpHpai & controlEndpoint )
void connectToHostEncrypted (const QHostAddress & address , quint16 port )
QKnxNetIpSecureConfiguration secureConfiguration () const
QKnxByteArray serialNumber () const
void setSecureConfiguration (const QKnxNetIpSecureConfiguration & config )
void setSerialNumber (const QKnxByteArray & serialNumber )

QKnxServiceInfo :

bool operator!= (const QKnxServiceInfo & other ) const
bool operator== (const QKnxServiceInfo & other ) const

QGeoRoute :

QVariantMap extendedAttributes () const
void setExtendedAttributes (const QVariantMap & extendedAttributes )

QGeoRouteRequest :

QDateTime departureTime () const
void setDepartureTime (const QDateTime & departureTime )

QGeoServiceProvider :

QGeoServiceProvider::Error geocodingError () const
QString geocodingErrorString () const
QGeoServiceProvider::Error mappingError () const
QString mappingErrorString () const
QGeoServiceProvider::Error navigationError () const
QString navigationErrorString () const
QGeoServiceProvider::Error placesError () const
QString placesErrorString () const
QGeoServiceProvider::Error routingError () const
QString routingErrorString () const

QVideoFrame :

QAbstractVideoBuffer * buffer () const

QAbstractSocket :

QString protocolTag () const
void setProtocolTag (const QString & tag )

QHostAddress :

uint qHash (const QOcspResponse & response , uint seed )

QNetworkAccessManager :

void connectToHostEncrypted (const QString & hostName , quint16 port , const QSslConfiguration & sslConfiguration , const QString & peerName )

QNetworkRequest :

QString peerVerifyName () const
void setPeerVerifyName (const QString & peerName )

QOcspResponse :

QOcspCertificateStatus certificateStatus () const
bool operator!= (const QOcspResponse & lhs , const QOcspResponse & rhs )
QOcspResponse & operator= (const QOcspResponse & other )
QOcspResponse & operator= (QOcspResponse && other )
bool operator== (const QOcspResponse & lhs , const QOcspResponse & rhs )
class QSslCertificate responder () const
QOcspRevocationReason revocationReason () const
QSslCertificate subject () const
void swap (QOcspResponse & other )

QSslConfiguration :

bool ocspStaplingEnabled () const
void setOcspStaplingEnabled (bool enabled )

QSslDiffieHellmanParameters :

uint qHash (const QOcspResponse & response , uint seed )

QSslPreSharedKeyAuthenticator :

bool operator!= (const QOcspResponse & lhs , const QOcspResponse & rhs )
bool operator== (const QOcspResponse & lhs , const QOcspResponse & rhs )

QSslSocket :

QVector<QOcspResponse> ocspResponses () const

QAbstractOAuth :

void prepareRequest (QNetworkRequest * request , const QByteArray & verb , const QByteArray & body )

QOAuth1 :

void setup (QNetworkRequest * request , const QVariantMap & signingParameters , const QByteArray & operationVerb )

QOAuth1Signature :

QByteArray customMethodString () const
void setCustomMethodString (const QByteArray & verb )

QOpcUaExtensionObject :

void setBinaryEncodedBody (const QByteArray & encodedBody , const QString & typeId )
void setXmlEncodedBody (const QByteArray & encodedBody , const QString & typeId )

QWindowsWindowFunctions :

void setHasBorderInFullScreenDefault (bool border )
const QByteArray setHasBorderInFullScreenDefaultIdentifier ()

QGeoLocation :

QVariantMap extendedAttributes () const
void setExtendedAttributes (const QVariantMap & data )

QPrinterInfo :

QPrinter::ColorMode defaultColorMode () const
QList<QPrinter::ColorMode> supportedColorModes () const

QModbusRtuSerialMaster :

void setTurnaroundDelay (int turnaroundDelay )
int turnaroundDelay () const

QModbusTcpServer :

void installConnectionObserver (QModbusTcpConnectionObserver * observer )
void modbusClientDisconnected (QTcpSocket * modbusClient )

QSqlDatabase :

QSqlDatabase cloneDatabase (const QString & other , const QString & connectionName )

QWaylandQuickItem :

QPointF mapFromSurface (const QPointF & point ) const

QQuickWebEngineProfile :

QWebEngineClientCertificateStore * clientCertificateStore ()

QWebEngineUrlRequestJob :

QMap<QByteArray, QByteArray> requestHeaders () const

QFileDialog :

void getOpenFileContent (const QString & nameFilter , const std::function<void (const QString &, const QByteArray &)> & fileOpenCompleted )

QListModel :

virtual bool moveRows (const QModelIndex & sourceParent , int sourceRow , int count , const QModelIndex & destinationParent , int destinationChild ) override

QPlainTextEdit :

bool find (const QRegularExpression & exp , QTextDocument::FindFlags options )

QTextEdit :

bool find (const QRegularExpression & exp , QTextDocument::FindFlags options )

QTreeView :

void expandRecursively (const QModelIndex & index , int depth )

名称空间中的新函数

QString fromId (const QString & id , const QString & defaultValue )
QString fromId (int id , const QString & defaultValue )
bool isSecureUserId (QKnx::NetIp::SecureUserId userId )
QOpcUa::Types metaTypeToQOpcUaType (QMetaType::Type type )
bool qIsPolishScheduled (const QQuickItem * item )
bool qWaitForItemPolished (const QQuickItem * item , int timeout )
void startActivity (const QAndroidJniObject & intent , int receiverRequestCode , std::function<void (int, int, const QAndroidJniObject &)> callbackFunc )
void startActivity (const QAndroidIntent & intent , int receiverRequestCode , QAndroidActivityResultReceiver * resultReceiver )

新全局函数

bool operator!= (const QOcspResponse & lhs , const QOcspResponse & rhs )
bool operator== (const QOcspResponse & lhs , const QOcspResponse & rhs )
uint qHash (const QOcspResponse & response , uint seed )
uint qHash (const QOcspResponse & response , uint seed )

新宏

QT_NO_DEPRECATED_WARNINGS
QT_NO_DEPRECATED_WARNINGS
Q_DISABLE_COPY_MOVE ( Class )
Q_DISABLE_COPY_MOVE ( Class )
Q_DISABLE_MOVE ( Class )
Q_DISABLE_MOVE ( Class )
Q_PROCESSOR_RISCV
Q_PROCESSOR_RISCV
Q_PROCESSOR_RISCV_32
Q_PROCESSOR_RISCV_32
Q_PROCESSOR_RISCV_64
Q_PROCESSOR_RISCV_64

新枚举类型

enum SecureUserId { Reserved, Management, UserRole, Invalid }
enum SandboxingLevel { SandboxingNone, SandboxingProcess, SandboxingLowIntegrity }
enum VerbosityLevel { MinimumVerbosity, DefaultVerbosity, MaximumVerbosity }
enum class QOcspCertificateStatus { Good, Revoked, Unknown }
enum class QOcspCertificateStatus { Good, Revoked, Unknown }
enum class QOcspRevocationReason { None, Unspecified, KeyCompromise, CACompromise, AffiliationChanged, …, RemoveFromCRL }
enum class QOcspRevocationReason { None, Unspecified, KeyCompromise, CACompromise, AffiliationChanged, …, RemoveFromCRL }
enum 压缩 { NoCompression, ZlibCompression, ZstdCompression }

新类型别名

typedef SetHasBorderInFullScreenDefault

新特性

新 QML 类型

L
LottieAnimation
S
SharedGLTexture
SplitHandle
SplitView
W
WlScaler

新 QML 特性

connection
currentEndpoint
departureTime
destinationSize
eventFilter
extendedAttributes
flushMode
sourceGeometry
supportedSecurityPolicies
supportedUserTokenTypes
transientParent

新 QML 信号

readNodeAttributesFinished ()
writeNodeAttributesFinished ()

新 QML 方法

fitViewportToGeoShape ()
isPolishScheduled ()
itemAtIndex ()
itemAtIndex ()
mapFromSurface ()
waitForItemPolished ()

其它 Qt 5 发行的补充