Qt 5.9 中的新类和函数

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

新类

A
QAbstractAnimation ( Qt3DAnimation )
QAbstractAnimationClip ( Qt3DAnimation )
QAbstractClipAnimator ( Qt3DAnimation )
QAbstractClipBlendNode ( Qt3DAnimation )
QAdditiveClipBlend ( Qt3DAnimation )
QAnimationAspect ( Qt3DAnimation )
QAnimationController ( Qt3DAnimation )
QAnimationGroup ( Qt3DAnimation )
B
QBlendedClipAnimator ( Qt3DAnimation )
C
QCanBusDeviceInfo
QCanBusFactoryV2
QClipAnimator ( Qt3DAnimation )
E
QExtrudedTextGeometry ( Qt3DExtras )
QEnvironmentLight ( Qt3DRender )
G
QGeoPath
H
QHelpSearchResult
QHstsPolicy
QHumidityFilter
QHumidityReading
QHumiditySensor
K
QKeyframeAnimation ( Qt3DAnimation )
L
QLidFilter
QLidReading
QLidSensor
QLerpClipBlend ( Qt3DAnimation )
QLevelOfDetail ( Qt3DRender )
QLevelOfDetailBoundingSphere ( Qt3DRender )
QLevelOfDetailSwitch ( Qt3DRender )
M
QMorphTarget ( Qt3DAnimation )
QMorphingAnimation ( Qt3DAnimation )
QMetalRoughMaterial ( Qt3DExtras )
QMemoryBarrier ( Qt3DRender )
O
QOperatingSystemVersion
Q
QQuickWebEngineScript
S
ScaledPixmapArgument ( QIconEngine )
QStaticByteArrayMatcher
QScene2D ( Qt3DRender::Quick )
T
QTextureMaterial ( Qt3DExtras )
QTexturedMetalRoughMaterial ( Qt3DExtras )
V
QVertexBlendAnimation ( Qt3DAnimation )
W
QWebEngineHttpRequest

新成员函数

QAbstractFileEngine :

virtual id () const

QDir :

isEmpty (QDir::Filters filters ) const

QByteArray :

toHex (char separator ) const

QDataStream :

operator<< (qfloat16 f )
operator<< (std::nullptr_t ptr )
operator>> (qfloat16 & f )
operator>> (std::nullptr_t & ptr )

QObject :

startTimer (std::chrono::milliseconds time , Qt::TimerType timerType )

QStorageInfo :

subvolume () const

QStringRef :

constBegin () const
constEnd () const
isRightToLeft () const

QTemporaryDir :

filePath (const QString & fileName ) const

QThreadPool :

tryTake (QRunnable * runnable )

QTimeZone :

fromCFTimeZone (CFTimeZoneRef timeZone )
fromNSTimeZone (const NSTimeZone * timeZone )
toCFTimeZone () const
toNSTimeZone () const

QVarLengthArray :

append (T && t )
push_back (T && t )

QHelpSearchEngine :

search (const QString & searchInput )
searchInput () const
searchResultCount () const
searchResults (int start , int end ) const

QHelpSearchQueryWidget :

searchInput () const
setSearchInput (const QString & searchInput )

QIconEngine :

scaledPixmap (const QSize & size , QIcon::Mode mode , QIcon::State state , qreal scale )

QImage :

reinterpretAsFormat (QImage::Format format )

QOffscreenSurface :

nativeHandle () const
setNativeHandle (void * handle )

QOpenGLShaderProgram :

addCacheableShaderFromSourceCode (QOpenGLShader::ShaderType type , const QByteArray & source )
addCacheableShaderFromSourceCode (QOpenGLShader::ShaderType type , const QString & source )
addCacheableShaderFromSourceCode (QOpenGLShader::ShaderType type , const char * source )
addCacheableShaderFromSourceFile (QOpenGLShader::ShaderType type , const QString & fileName )

QOpenGLTexture :

setCompressedData (int mipLevel , int layer , int layerCount , QOpenGLTexture::CubeMapFace cubeFace , int dataSize , const void * data , const QOpenGLPixelTransferOptions *const options )
setData (int mipLevel , int layer , int layerCount , QOpenGLTexture::CubeMapFace cubeFace , QOpenGLTexture::PixelFormat sourceFormat , QOpenGLTexture::PixelType sourceType , const void * data , const QOpenGLPixelTransferOptions *const options )

TouchPoint :

ellipseDiameters () const

QWindow :

parent (QWindow::AncestorMode mode ) const
setFlag (Qt::WindowType flag , bool on )

QTextDocument :

toRawText () const

QPlatformScreen :

virtual currentMode () const
virtual manufacturer () const
virtual model () const
virtual modes () const
virtual preferredMode () const
virtual serialNumber () const

QPlatformTheme :

virtual standardButtonShortcut (int button ) const

QGeoCameraCapabilities :

maximumFieldOfView () const
minimumFieldOfView () const
overzoomEnabled () const
setMaximumFieldOfView (double maximumFieldOfView )
setMinimumFieldOfView (double minimumFieldOfView )
setOverzoomEnabled (bool overzoomEnabled )

QGeoCodeReply :

aborted ()

QGeoRouteReply :

aborted ()

QPlaceReply :

aborted ()

QHostInfo :

lookupHost (const QString & name , Functor functor )
lookupHost (const QString & name , const QObject * context , Functor functor )
lookupHost (const QString & name , const QObject * receiver , PointerToMemberFunction function )

QNetworkAccessManager :

addStrictTransportSecurityHosts (const QVector<QHstsPolicy> & knownHosts )
clearConnectionCache ()
isStrictTransportSecurityEnabled () const
redirectPolicy () const
setRedirectPolicy (QNetworkRequest::RedirectPolicy policy )
setStrictTransportSecurityEnabled (bool enabled )
strictTransportSecurityHosts () const

QNetworkConfiguration :

connectTimeout () const
setConnectTimeout (int timeout )

QNetworkReply :

redirectAllowed ()

QNearFieldTarget :

disconnect ()
keepConnection () const
maxCommandLength () const
setKeepConnection (bool isPersistent )

QWindowsWindowFunctions :

isTabletMode ()
isTabletModeIdentifier ()

QGeoCircle :

extendCircle (const QGeoCoordinate & coordinate )

QGeoRectangle :

extendRectangle (const QGeoCoordinate & coordinate )

QGeoShape :

boundingGeoRectangle () const

QQmlEngine :

offlineStorageDatabaseFilePath (const QString & databaseName ) const

QQmlError :

messageType () const
setMessageType (QtMsgType messageType )

QQuickWindow :

sceneGraphBackend ()

QSGTexture :

anisotropyLevel () const
setAnisotropyLevel (QSGTexture::AnisotropyLevel level )

QQuickStyle :

availableStyles ()

QCanBus :

availableDevices (const QString & plugin , QString * errorMessage ) const

QCanBusFrame :

hasBitrateSwitch () const
hasErrorStateIndicator () const
setBitrateSwitch (bool bitrateSwitch )
setErrorStateIndicator (bool errorStateIndicator )

QWebSocketServer :

handleConnection (QTcpSocket * socket ) const

QFileDialog :

selectedMimeTypeFilter () const

QSizePolicy :

transposed () const

QSplitter :

replaceWidget (int index , QWidget * widget )

QSystemTrayIcon :

showMessage (const QString & title , const QString & message , const QIcon & icon , int millisecondsTimeoutHint )

QUndoCommand :

isObsolete () const
setObsolete (bool obsolete )

QWidget :

setWindowFlag (Qt::WindowType flag , bool on )

QSkyboxEntity :

isGammaCorrectEnabled () const
setGammaCorrectEnabled (bool enabled )

QRenderCaptureReply :

saveImage (const QString & fileName ) const

名称空间中的新函数

addRow (const char * format , ... )
qmlDebug (const QObject * object )
qmlWarning (const QObject * object )

新全局函数

operator!= (QHostAddress::SpecialAddress lhs , const QHostAddress & rhs )
qChecksum (const char * data , uint len , Qt::ChecksumType standard )
qMakeStaticByteArrayMatcher (const char (&)[N] pattern )
qmlRegisterModule (const char * uri , int versionMajor , int versionMinor )

新枚举类型

enum RedirectPolicy { ManualRedirectPolicy, NoLessSafeRedirectPolicy, SameOriginRedirectPolicy, UserVerifiedRedirectPolicy }
enum AnisotropyLevel { AnisotropyNone, Anisotropy2x, Anisotropy4x, Anisotropy8x, Anisotropy16x }
enum ChecksumType { ChecksumIso3309, ChecksumItuV41 }

新的 Typedef

typedef IsTabletModeType

新特性

新的变量

AndroidJellyBean
AndroidJellyBean_MR1
AndroidJellyBean_MR2
AndroidKitKat
AndroidLollipop
AndroidLollipop_MR1
AndroidMarshmallow
AndroidNougat
AndroidNougat_MR1
MacOSSierra
OSXElCapitan
OSXMavericks
OSXYosemite
Windows10
Windows7
Windows8
Windows8_1

新 QML 类型

A
AbstractAnimation
AbstractClipAnimator
AbstractClipBlendNode
AdditiveClipBlend
AnimationController
AnimationGroup
B
BlendedClipAnimator
C
ClipAnimator
D
DelayButton
E
EnvironmentLight
K
KeyframeAnimation
L
LerpClipBlend
LevelOfDetail
LevelOfDetailLoader
LevelOfDetailSwitch
M
MemoryBarrier
MorphTarget
MorphingAnimation
S
Scene2D
ScrollView
T
TouchEventSequence
V
VertexBlendAnimation

新 QML 特性

ellipseDiameters
fontInfo.bold
fontInfo.family
fontInfo.italic
fontInfo.pixelSize
fontInfo.pointSize
fontInfo.styleName
fontInfo.weight
horizontalOvershoot
loops
mapParameters
mapReady
markerShape
mirrored
mirrored
notifyInterval
notifyInterval
notifyInterval
pressAndHoldInterval
rotation
screen
sequences
supportedModes
supportedResolutions
uniqueId
verticalOvershoot
virtualX
virtualY

新 QML 信号

positioningComplete ()
positioningComplete ()
positioningComplete ()
shortcutOverride ()
positioningComplete ()
textEdited ()

新 QML 方法

forceLayout ()
forceLayout ()
forceLayout ()
addMapItemGroup ()
addMapParameter ()
clearMapParameters ()
removeMapItemGroup ()
removeMapParameter ()
path ()
shapeToPath ()
saveImage ()
forceLayout ()
createTemporaryObject ()
createTemporaryQmlObject ()
touchEvent ()
forceLayout ()

其它 Qt 5 发行的补充