Qt 5.10 的新類和新函數

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

新類

A
QAndroidBinder
QAndroidIntent
QAndroidJniExceptionCleaner
QAndroidParcel
QAndroidService
QAndroidServiceConnection
QAbstractSkeleton ( Qt3DCore )
QArmature ( Qt3DCore )
QAbstractCameraController ( Qt3DExtras )
B
QBEInteger
QBlitFramebuffer ( Qt3DRender )
D
QDiffuseSpecularMaterial ( Qt3DExtras )
G
QGeoPolygon
J
QJoint ( Qt3DCore )
K
QKeyValueIterator
L
QLEInteger
QLineWidth ( Qt3DRender )
N
QNodeCommand ( Qt3DCore )
P
QPickLineEvent ( Qt3DRender )
QPickPointEvent ( Qt3DRender )
QProximityFilter ( Qt3DRender )
R
QRandomGenerator
QRandomGenerator64
S
QSemaphoreReleaser
QStringView
QSkeleton ( Qt3DCore )
QSkeletonLoader ( Qt3DCore )
QShaderProgramBuilder ( Qt3DRender )
V
QVulkanDeviceFunctions
QVulkanFunctions
QVulkanInstance
QVulkanWindow
QVulkanWindowRenderer
W
QWaylandXdgPopupV6
QWaylandXdgShellV6
QWaylandXdgSurfaceV6
QWaylandXdgToplevelV6

新成員函數

類 QAbstractFileEngine :

virtual cloneTo (QAbstractFileEngine * target )
virtual setFileTime (const QDateTime & newDate , QAbstractFileEngine::FileTime time )

類 QDebug :

operator<< (QStringView s )

類 QFileDevice :

fileTime (QFileDevice::FileTime time ) const
setFileTime (const QDateTime & newDate , QFileDevice::FileTime fileTime )

類 QFileInfo :

birthTime () const
fileTime (QFile::FileTime time ) const
metadataChangeTime () const

類 QIODevice :

skip (qint64 maxSize )

類 QProcess :

startDetached (qint64 * pid )

類 QTextCodec :

canEncode (QStringView s ) const
fromUnicode (QStringView str ) const

類 QTextEncoder :

fromUnicode (QStringView str )

類 QByteArray :

back ()
back () const
chopped (int len ) const
front ()
front () const
shrink_to_fit ()

類 QHash :

constKeyValueBegin () const
constKeyValueEnd () const
keyValueBegin ()
keyValueBegin () const
keyValueEnd ()
keyValueEnd () const

類 QJsonArray :

operator= (QJsonArray && other )
swap (QJsonArray & other )

類 QJsonDocument :

operator= (QJsonDocument && other )
operator[] (QLatin1String key ) const
operator[] (const QString & key ) const
operator[] (int i ) const
swap (QJsonDocument & other )

類 QJsonObject :

operator= (QJsonObject && other )
swap (QJsonObject & other )

類 QJsonValue :

operator= (QJsonValue && other )
operator[] (QLatin1String key ) const
operator[] (const QString & key ) const
operator[] (int i ) const
swap (QJsonValue & other )

類 QLatin1String :

back () const
begin () const
cbegin () const
cend () const
chop (int length )
chopped (int length ) const
crbegin () const
crend () const
end () const
front () const
isEmpty () const
isNull () const
rbegin () const
rend () const
trimmed () const
truncate (int length )

類 QLocale :

formattedDataSize (qint64 bytes , int precision , QLocale::DataSizeFormats format )
toDouble (QStringView s , bool * ok ) const
toFloat (QStringView s , bool * ok ) const
toInt (QStringView s , bool * ok ) const
toLongLong (QStringView s , bool * ok ) const
toShort (QStringView s , bool * ok ) const
toString (const QDate & date , QStringView format ) const
toString (const QDateTime & dateTime , QStringView format ) const
toString (const QTime & time , QStringView format ) const
toUInt (QStringView s , bool * ok ) const
toULongLong (QStringView s , bool * ok ) const
toUShort (QStringView s , bool * ok ) const

類 QMap :

constKeyValueBegin () const
constKeyValueEnd () const
keyValueBegin ()
keyValueBegin () const
keyValueEnd ()
keyValueEnd () const

類 QMetaObject :

invokeMethod (QObject * context , Functor function , FunctorReturnType * ret )
invokeMethod (QObject * context , Functor function , Qt::ConnectionType type , FunctorReturnType * ret )

類 QRegularExpressionMatch :

captured (QStringView name ) const
capturedEnd (QStringView name ) const
capturedLength (QStringView name ) const
capturedRef (QStringView name ) const
capturedStart (QStringView name ) const
capturedView (QStringView name ) const
capturedView (int nth ) const

類 QSettings :

isAtomicSyncRequired () const
setAtomicSyncRequired (bool enable )

類 QString :

arg (QLatin1String a , int fieldWidth , QChar fillChar ) const
arg (QStringView a , int fieldWidth , QChar fillChar ) const
back ()
back () const
chopped (int len ) const
endsWith (QStringView str , Qt::CaseSensitivity cs ) const
front ()
front () const
shrink_to_fit ()
startsWith (QStringView str , Qt::CaseSensitivity cs ) const

類 QStringList :

contains (QLatin1String str , Qt::CaseSensitivity cs ) const

類 QStringRef :

back () const
chopped (int len ) const
endsWith (QStringView str , Qt::CaseSensitivity cs ) const
front () const
startsWith (QStringView str , Qt::CaseSensitivity cs ) const

類 QThread :

create (Function && f )
create (Function && f , Args &&... args )

類 QVarLengthArray :

shrink_to_fit ()

類 QUuid :

fromString (QLatin1String text )
fromString (QStringView text )

類 QVector :

shrink_to_fit ()

類 QVersionNumber :

fromString (QLatin1String string , int * suffixIndex )
fromString (QStringView string , int * suffixIndex )

類 QGuiApplication :

screenAt (const QPoint & point )

類 QImage :

sizeInBytes () const

類 QNativeGestureEvent :

device () const

類 QColor :

isValidColor (QStringView name )
setNamedColor (QStringView name )

類 QPdfWriter :

pdfVersion () const
setPdfVersion (QPagedPaintDevice::PdfVersion version )

類 QPolygon :

intersects (const QPolygon & p ) const

類 QPolygonF :

intersects (const QPolygonF & p ) const

類 QSurfaceFormat :

colorSpace () const
setColorSpace (QSurfaceFormat::ColorSpace colorSpace )

類 QWindow :

setWindowStates (Qt::WindowStates state )
windowStates () const

類 QTextOption :

setTabStopDistance (qreal tabStopDistance )
tabStopDistance () const

類 QPlatformCursor :

virtual clearOverrideCursor ()
virtual setOverrideCursor ( const QCursor & )

類 QPlatformIntegration :

virtual createPlatformVulkanInstance (QVulkanInstance * instance ) const

類 QHostInfo :

operator= (QHostInfo && other )
swap (QHostInfo & other )

類 QLocalServer :

socketDescriptor () const

類 QNetworkAccessManager :

enableStrictTransportSecurityStore (bool enabled , const QString & storeDir )
isStrictTransportSecurityStoreEnabled () const

類 QGeoPath :

size () const

類 QGeoPolygon :

size () const

類 QPrinter :

pdfVersion () const
setPdfVersion (QPagedPaintDevice::PdfVersion version )

類 QQmlEngine :

retranslate ()

類 QQuickItem :

acceptTouchEvents () const
setAcceptTouchEvents (bool enabled )
setSize (const QSizeF & size )
size () const

類 QQuickWindow :

setTextRenderType (QQuickWindow::TextRenderType renderType )
textRenderType ()

類 QCanBusFrame :

hasLocalEcho () const
setLocalEcho (bool echo )

類 QSqlError :

operator= (QSqlError && other )
swap (QSqlError & other )

類 QSqlQueryModel :

virtual roleNames () const override

類 QAbstractItemView :

isPersistentEditorOpen (const QModelIndex & index ) const

類 QLineEdit :

selectionEnd () const
selectionLength () const

類 QListWidget :

isPersistentEditorOpen (QListWidgetItem * item ) const

類 QOpenGLWidget :

setTextureFormat (GLenum texFormat )
textureFormat () const

類 QTableWidget :

isPersistentEditorOpen (QTableWidgetItem * item ) const

類 QTreeWidget :

isPersistentEditorOpen (QTreeWidgetItem * item , int column ) const

類 QX11Info :

generatePeekerId ()
peekEventQueue (QX11Info::PeekerCallback peeker , void * peekerData , QX11Info::PeekOptions option , qint32 peekerId )
removePeekerId (qint32 peekerId )

類 QAbstractOAuth2 :

virtual post (const QUrl & url , QHttpMultiPart * multiPart )
virtual post (const QUrl & url , const QByteArray & data )
virtual put (const QUrl & url , QHttpMultiPart * multiPart )
virtual put (const QUrl & url , const QByteArray & data )

名稱空間中的新函數

bindService (const QAndroidIntent & serviceIntent , const QAndroidServiceConnection & serviceConnection , QtAndroid::BindFlags flags )
checkPermission (const QString & permission )
hideSplashScreen (int duration )
keySequence (QWindow * window , const QKeySequence & keySequence )
keySequence (QWidget * widget , const QKeySequence & keySequence )
qWaitFor (Functor predicate , int timeout )
requestPermissions (const QStringList & permissions , const QtAndroid::PermissionResultCallback & callbackFunc )
requestPermissionsSync (const QStringList & permissions , int timeoutMs )
shouldShowRequestPermissionRationale (const QString & permission )

新全局函數

operator!= (const QVulkanLayer & lhs , const QVulkanLayer & rhs )
operator!= (const QVulkanExtension & lhs , const QVulkanExtension & rhs )
operator!= (const QCursor & lhs , const QCursor & rhs )
operator== (const QVulkanLayer & lhs , const QVulkanLayer & rhs )
operator== (const QVulkanExtension & lhs , const QVulkanExtension & rhs )
operator== (const QCursor & lhs , const QCursor & rhs )
qHash (const QVulkanLayer & key , uint seed )
qHash (const QVulkanExtension & key , uint seed )
qHash (QStringView key , uint seed )

新枚舉類型

enum FileTime { FileAccessTime, FileBirthTime, FileMetadataChangeTime, FileModificationTime }
enum DataSizeFormat { DataSizeBase1000, DataSizeSIQuantifiers, DataSizeIecFormat, DataSizeTraditionalFormat, DataSizeSIFormat }
enum Capability { OverrideCursor }
enum TextRenderType { QtTextRendering, NativeTextRendering }
enum Flag { NoDebugOutputRedirect }
enum PeekOption { PeekDefault, PeekFromCachedIndex }
enum BindFlag { None, AutoCreate, DebugUnbind, NotForeground, ..., ExternalService }
enum PermissionResult { Granted, Denied }

新的 Typedef

typedef const_key_value_iterator
typedef key_value_iterator
typedef const_iterator
typedef const_reverse_iterator
typedef difference_type
typedef iterator
typedef reference
typedef reverse_iterator
typedef size_type
typedef value_type
typedef const_key_value_iterator
typedef key_value_iterator
typedef PeekerCallback
typedef qint16_be
typedef qint16_le
typedef qint32_be
typedef qint32_le
typedef qint64_be
typedef qint64_le
typedef qsizetype
typedef quint16_be
typedef quint16_le
typedef quint32_be
typedef quint32_le
typedef quint64_be
typedef quint64_le

新特性

新 QML 類型

A
AbstractSkeleton
動作
ActionGroup
Armature
B
BlitFramebuffer
C
ConicalGradient
D
DiffuseSpecularMaterial
J
Joint
L
LineWidth
LinearGradient
M
MenuBar
MenuBarItem
MultiPointHandler
O
Overlay
P
PointerDeviceHandler
PointerHandler
ProximityFilter
R
RadialGradient
S
ShaderProgramBuilder
Shape
ShapeGradient
ShapePath
Skeleton
SkeletonLoader
X
XdgPopupV6
XdgShellV6
XdgSurfaceV6
XdgToplevelV6

新 QML 特性

advance
boundsMovement
defaultSuffix
font.kerning
font.kerning
font.kerning
font.preferShaping
font.preferShaping
font.preferShaping
layer.samples
manufacturer
model
samples
serialNumber
supportedFocusPointModes
tabStopDistance

新 QML 方法

addMapItemView ()
alignCoordinateToPoint ()
removeMapItemView ()
setBearing ()
setPath ()
polygon ()
polygon ()
shapeToPolygon ()
keySequence ()

其它 Qt 5 發行的補充