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 command )

類 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 language () 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 }
枚舉類 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 發行的補充