Qt 5.15 中的新类和函数

此页面包含 Qt 5.15 引入的所有新类和函数的综合列表。Qt 5 之前发行的新 API 链接在此页面底部可找到。

新类

F
FromBase64Result ( QByteArray )
H
QHelpFilterSettingsWidget
QHelpLink
N
NativeTexture ( QSGTexture )
P
QPdfDestination
QPdfSelection
Q
QQuick3D
QQuick3DGeometry
QQuick3DObject
R
QRenderCapabilities ( Qt3DRender )

新成员函数

FromBase64Result :

bool operator!= (const QMetaType & a , const QMetaType & b )
bool operator== (const QMetaType & a , const QMetaType & b )

QChar :

bool operator!= (const QMetaType & a , const QMetaType & b )
bool operator== (const QMetaType & a , const QMetaType & b )

QConcatenateTablesProxyModel :

QList<QAbstractItemModel *> sourceModels () const

QFile :

bool moveToTrash ()
bool moveToTrash (const QString & fileName , QString * pathInTrash )

QFileInfo :

bool isJunction () const

QHash :

void insert (const QHash<K, V> & other )

QIdentityProxyModel :

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

QKeyValueIterator :

bool operator!= (const QMetaType & a , const QMetaType & b )
QKeyValueIterator::pointer operator-> () const
bool operator== (const QMetaType & a , const QMetaType & b )

QMap :

void insert (const QMap<Key, T> & map )

QMetaProperty :

bool isRequired () const

QMetaType :

QMetaType fromType ()
::QByteArray name () const
bool operator!= (const QMetaType & a , const QMetaType & b )
bool operator== (const QMetaType & a , const QMetaType & b )

QPair :

bool operator!= (const QMetaType & a , const QMetaType & b )
bool operator== (const QMetaType & a , const QMetaType & b )

QProcess :

QStringList splitCommand (QStringView 命令 )

QRegularExpression :

QString anchoredPattern (QStringView 表达式 )
QString escape (QStringView str )
QString wildcardToRegularExpression (QStringView pattern )

QResource :

QByteArray uncompressedData () const
qint64 uncompressedSize () const

QRunnable :

QRunnable * create (std::function<void ()> functionToRun )

QScopedPointer :

bool operator!= (const QMetaType & a , const QMetaType & b )
bool operator== (const QMetaType & a , const QMetaType & b )

QSignalMapper :

void mappedInt (int i )
void mappedObject (QObject * object )
void mappedString (const QString & text )
void mappedWidget (QWidget * widget )

QSocketNotifier :

void activated (QSocketDescriptor socket , QSocketNotifier::Type type )

QSortFilterProxyModel :

void filterCaseSensitivityChanged (Qt::CaseSensitivity filterCaseSensitivity )
void filterRoleChanged (int filterRole )
void recursiveFilteringEnabledChanged (bool recursiveFilteringEnabled )
void sortCaseSensitivityChanged (Qt::CaseSensitivity sortCaseSensitivity )
void sortLocaleAwareChanged (bool sortLocaleAware )
void sortRoleChanged (int sortRole )

QStateMachine :

int postDelayedEvent (QEvent * event , std::chrono::milliseconds delay )

QString :

bool isValidUtf16 () const

QStringView :

bool isValidUtf16 () const

QThread :

bool wait (QDeadlineTimer deadline )

QThreadPool :

void start (std::function<void ()> functionToRun , int priority )
bool tryStart (std::function<void ()> functionToRun )

QTranslator :

QString filePath () const
QString 语言 () const

QVarLengthArray :

bool operator!= (const QMetaType & a , const QMetaType & b )
bool operator== (const QMetaType & a , const QMetaType & b )

QXmlStreamReader :

int entityExpansionLimit () const
void setEntityExpansionLimit (int limit )

qfloat16 :

qfloat16 copySign (qfloat16 sign ) const

QColorSpace :

QVariant operator QVariant () const

QCursor :

QBitmap bitmap ( Qt::ReturnByValueConstant ) const
QBitmap mask ( Qt::ReturnByValueConstant ) const

QPdfWriter :

void addFileAttachment (const QString & fileName , const QByteArray & data , const QString & mimeType )
QByteArray documentXmpMetadata () const
void setDocumentXmpMetadata (const QByteArray & xmpMetadata )

QPlatformWindow :

virtual bool startSystemMove ()
virtual bool startSystemResize (Qt::Edges edges )

QScreen :

QScreen * virtualSiblingAt (QPoint point )

QVulkanInstance :

void presentAboutToBeQueued (QWindow * window )

QVulkanWindow :

uint32_t graphicsQueueFamilyIndex () const
void setQueueCreateInfoModifier (const QVulkanWindow::QueueCreateInfoModifier & modifier )

QWindow :

bool startSystemMove ()
bool startSystemResize (Qt::Edges edges )

QHelpEngineCore :

QList<QHelpLink> documentsForIdentifier (const QString & id ) const
QList<QHelpLink> documentsForIdentifier (const QString & id , const QString & filterName ) const
QList<QHelpLink> documentsForKeyword (const QString & keyword ) const
QList<QHelpLink> documentsForKeyword (const QString & keyword , const QString & filterName ) const

QHelpFilterEngine :

QList<QVersionNumber> availableVersions () const
QStringList indices () const
QStringList indices (const QString & filterName ) const

QHelpIndexModel :

QHelpEngineCore * helpEngine () const

QHelpIndexWidget :

void documentActivated (const QHelpLink & document , const QString & keyword )
void documentsActivated (const QList<QHelpLink> & documents , const QString & keyword )

QCamera :

void errorOccurred (QCamera::Error value )

QMediaPlayer :

void setVideoOutput (const QVector<QAbstractVideoSurface *> & surfaces )

QVideoFrame :

QImage image () const

QAbstractSocket :

void errorOccurred (QAbstractSocket::SocketError socketError )

QLocalSocket :

void errorOccurred (QLocalSocket::LocalSocketError socketError )

QNetworkAccessManager :

void setTransferTimeout (int timeout )
int transferTimeout () const

QNetworkReply :

void errorOccurred (QNetworkReply::NetworkError code )

QNetworkRequest :

void setTransferTimeout (int timeout )
int transferTimeout () const

QSslCertificate :

QList<QSslCertificate> fromPath (const QString & path , QSsl::EncodingFormat format , QSslCertificate::PatternSyntax syntax )

QSslConfiguration :

void addCaCertificate (const QSslCertificate & certificate )
bool addCaCertificates (const QString & path , QSsl::EncodingFormat format , QSslCertificate::PatternSyntax syntax )
void addCaCertificates (const QList<QSslCertificate> & certificates )

QSslSocket :

void newSessionTicketReceived ()
QList<QSslError> sslHandshakeErrors () const

QQmlIncubationController :

void incubateWhile (std::atomic<bool> * flag , int msecs )

QQmlIncubator :

void setInitialProperties (const QVariantMap & initialProperties )

QQmlIncubatorPrivate :

RequiredProperties & requiredProperties ()

QSGTexture :

QSGTexture::NativeTexture nativeTexture () const

QSvgRenderer :

QTransform transformForElement (const QString & id ) const

QWebSocket :

quint64 maxAllowedIncomingFrameSize () const
quint64 maxAllowedIncomingMessageSize () const
quint64 maxIncomingFrameSize ()
quint64 maxIncomingMessageSize ()
quint64 maxOutgoingFrameSize ()
quint64 outgoingFrameSize () const
void setMaxAllowedIncomingFrameSize (quint64 maxAllowedIncomingFrameSize )
void setMaxAllowedIncomingMessageSize (quint64 maxAllowedIncomingMessageSize )
void setOutgoingFrameSize (quint64 outgoingFrameSize )

QButtonGroup :

void idClicked (int id )
void idPressed (int id )
void idReleased (int id )
void idToggled (int id , bool checked )

QLabel :

QPicture picture ( Qt::ReturnByValueConstant ) const
QPixmap pixmap ( Qt::ReturnByValueConstant ) const

QTabBar :

bool isTabVisible (int index ) const
void setTabVisible (int index , bool visible )

QTabWidget :

bool isTabVisible (int index ) const
void setTabVisible (int index , bool visible )

QWizard :

QList<int> visitedIds () const

QDomDocument :

bool setContent (QXmlStreamReader * reader , bool namespaceProcessing , QString * errorMsg , int * errorLine , int * errorColumn )

新全局函数

bool operator!= (const QMetaType & a , const QMetaType & b )
bool operator== (const QMetaType & a , const QMetaType & b )

新枚举类型

enum TransferTimeoutConstant { DefaultTransferTimeoutConstant }
enum Format { GLSL, SPIRV }
enum class PatternSyntax { RegularExpression, Wildcard, FixedString }
enum ReturnByValueConstant { ReturnByValue }

新特性

新 QML 类型

B
Bounds
C
CullMode
D
DepthInput
P
PdfDocument
PdfLinkModel
PdfNavigationStack
PdfSearchModel
PdfSelection
Q
Quaternion
QuaternionAnimation
R
RenderCapabilities
S
SetUniformValue
SpotLight

新 QML 特性

antialiasingMode
antialiasingQuality
backend
backend
backend
backend
cursorShape
cursorShape
dragThreshold
effects
flushMode
format
renderCapabilities
reuseItems
showDebugOverlay
sourceClipRect
staticFlags
temporalAAStrength
uiLanguage
updateAxesContinuously
videoOutput
videoSurface

新 QML 信号

errorOccurred ()

新 QML 方法

lookAt ()
lookAt ()
start ()
stop ()

其它 Qt 5 发行的补充