Qt 5.4 中的新类和函数

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

新类

A
QAbstractPlanarVideoBuffer
B
QByteArrayList
C
QCocoaNativeContext
D
QDistanceFilter
QDistanceReading
QDistanceSensor
E
QEGLNativeContext
QEnableSharedFromThis
G
QGLXNativeContext
L
QLowEnergyCharacteristic
QLowEnergyController
QLowEnergyDescriptor
QLowEnergyService
O
QOpenGLWidget
QOpenGLWindow
P
QPaintDeviceWindow
QPixelFormat
Q
QQuickRenderControl
R
QRasterWindow
S
QSGAbstractRenderer
QSGEngine
QStorageInfo
W
QWGLNativeContext
QWebChannel
QWebChannelAbstractTransport
QWebEnginePage
QWebEngineSettings
QWebEngineView
QWinMime

新成员函数

QBluetoothDeviceInfo :

coreConfigurations () const
setCoreConfigurations (QBluetoothDeviceInfo::CoreConfigurations coreConfigs )

QBluetoothTransferReply :

error (QBluetoothTransferReply::TransferError errorType )

QBluetoothUuid :

characteristicToString (QBluetoothUuid::CharacteristicType uuid )
descriptorToString (QBluetoothUuid::DescriptorType uuid )
protocolToString (QBluetoothUuid::ProtocolUuid uuid )

QDebug :

maybeQuote (char c )
noquote ()
quote ()
resetFormat ()

QAbstractProxyModel :

virtual canDropMimeData (const QMimeData * data , Qt::DropAction action , int row , int column , const QModelIndex & parent ) const override
virtual dropMimeData (const QMimeData * data , Qt::DropAction action , int row , int column , const QModelIndex & parent ) override

QAbstractState :

activeChanged (bool active )

QAbstractTransition :

targetStateChanged ()
targetStatesChanged ()

QByteArray :

fromStdString (const std::string & str )
toStdString () const

QCommandLineParser :

addOptions (const QList<QCommandLineOption> & options )
showVersion ()

QEnableSharedFromThis :

sharedFromThis ()
sharedFromThis () const

QHistoryState :

defaultStateChanged ()
historyTypeChanged ()

QRegularExpression :

optimize () const

QSignalTransition :

senderObjectChanged ()
signalChanged ()

QState :

childModeChanged ()
errorStateChanged ()
initialStateChanged ()

QStateMachine :

runningChanged (bool running )

QString :

splitRef (QChar sep , QString::SplitBehavior behavior , Qt::CaseSensitivity cs ) const
splitRef (const QRegExp & rx , QString::SplitBehavior behavior ) const
splitRef (const QRegularExpression & re , QString::SplitBehavior behavior ) const
splitRef (const QString & sep , QString::SplitBehavior behavior , Qt::CaseSensitivity cs ) const

QStringList :

operator<< (const QList<QString> & other )
operator= (QList<QString> && other )
operator= (const QList<QString> & other )

QStringRef :

begin () const
cbegin () const
cend () const
end () const
split (QChar sep , QString::SplitBehavior behavior , Qt::CaseSensitivity cs ) const
split (const QString & sep , QString::SplitBehavior behavior , Qt::CaseSensitivity cs ) const

QTimer :

singleShot (int msec , Functor functor )
singleShot (int msec , Qt::TimerType timerType , Functor functor )
singleShot (int msec , Qt::TimerType timerType , const QObject * context , Functor functor )
singleShot (int msec , Qt::TimerType timerType , const QObject * receiver , PointerToMemberFunction method )
singleShot (int msec , const QObject * context , Functor functor )
singleShot (int msec , const QObject * receiver , PointerToMemberFunction method )

QUrl :

fromUserInput (const QString & userInput , const QString & workingDirectory , QUrl::UserInputResolutionOptions options )

QVector :

removeAll (const T & t )
removeOne (const T & t )

QWeakPointer :

lock () const
swap (QWeakPointer<T> & other )

QSysInfo :

buildAbi ()
buildCpuArchitecture ()
currentCpuArchitecture ()
kernelType ()
kernelVersion ()
prettyProductName ()
productType ()
productVersion ()

QGuiApplication :

paletteChanged (const QPalette & palette )
screenRemoved (QScreen * screen )

QImageReader :

subType () const
supportedSubTypes () const

QImageWriter :

setSubType (const QByteArray & type )
subType () const
supportedSubTypes () const

QOpenGLContext :

nativeHandle () const
setNativeHandle (const QVariant & handle )

QOpenGLTexture :

depthStencilMode () const
setDepthStencilMode (QOpenGLTexture::DepthStencilMode mode )
target () const

QSurfaceFormat :

defaultFormat ()
setDefaultFormat (const QSurfaceFormat & format )

QPlatformDrag :

virtual ownsDragObject () const

QPlatformWindow :

screenForGeometry (const QRect & newGeometry ) const

QAbstractVideoBuffer :

mapPlanes (QAbstractVideoBuffer::MapMode mode , int * numBytes , int [4] bytesPerLine , uchar *[4] data )

QVideoFrame :

bits (int plane )
bits (int plane ) const
bytesPerLine (int plane ) const
planeCount () const

QSslCertificate :

importPkcs12 (QIODevice * device , QSslKey * key , QSslCertificate * certificate , QList<QSslCertificate> * caCertificates , const QByteArray & passPhrase )
isSelfSigned () const

QSslConfiguration :

sessionProtocol () const

QSslSocket :

sessionProtocol () const
sslLibraryBuildVersionNumber ()
sslLibraryBuildVersionString ()

QPrinterInfo :

defaultDuplexMode () const
supportedDuplexModes () const

QQuickWindow :

scheduleRenderJob (QRunnable * job , QQuickWindow::RenderStage stage )

QSGSimpleTextureNode :

ownsTexture () const
setOwnsTexture (bool owns )

QGraphicsSceneMouseEvent :

flags () const
source () const

QWinThumbnailToolBar :

iconicLivePreviewPixmapRequested ()
iconicThumbnailPixmapRequested ()

QX11Info :

nextStartupId ()
setNextStartupId (const QByteArray & id )

QXmlSchema :

operator= (const QXmlSchema & other )

名称空间中的新函数

run (QThreadPool * pool , Function function , ... )

新全局函数

qFormatLogMessage (QtMsgType type , const QMessageLogContext & context , const QString & str )
qHash (const QSslError & key , uint seed )
qHash (const QSslCertificate & key , uint seed )
qHashBits (const void * p , size_t len , uint seed )
qNextPowerOfTwo (quint64 value )
qNextPowerOfTwo (qint64 value )
qNextPowerOfTwo (quint32 value )
qNextPowerOfTwo (qint32 value )

新宏

Q_LOGGING_CATEGORY ( name , string , msgType )
qUtf8Printable (const QString & str )

新枚举类型

enum CoreConfiguration { UnknownCoreConfiguration, LowEnergyCoreConfiguration, BaseRateCoreConfiguration, BaseRateAndLowEnergyCoreConfiguration }
enum CharacteristicType { DeviceName, Appearance, PeripheralPrivacyFlag, ReconnectionAddress, ..., BarometricPressureTrend }
enum DescriptorType { UnknownDescriptorType, CharacteristicExtendedProperties, CharacteristicUserDescription, ClientCharacteristicConfiguration, ..., EnvironmentalSensingTriggerSetting }
enum DepthStencilMode { DepthMode, StencilMode }
enum RenderStage { BeforeSynchronizingStage, AfterSynchronizingStage, BeforeRenderingStage, AfterRenderingStage, AfterSwapStage, NoStage }
enum UserInputResolutionOption { DefaultResolution, AssumeLocalFile }

新的 Typedef

typedef QLowEnergyHandle
typedef const_iterator

新特性

新 QML 类型

A
ApplicationWindowStyle
F
FinalState
FontMetrics
H
HistoryState
O
OpenGLInfo
Q
QAbstractState
QAbstractTransition
QSignalTransition
S
SignalTransition
State
StateMachine
T
TextMetrics
TimeoutTransition
W
WebChannel

新 QML 特性

active
activeFocusItem
containsPress
contentItem
devicePixelRatio
iconicLivePreviewSource
iconicNotificationsEnabled
iconicThumbnailSource
ignored
orientationUpdateMask
passwordMaskDelay
sidebarVisible
visibility

新 QML 信号

iconicLivePreviewRequested ()
iconicThumbnailRequested ()

新 QML 方法

findChild ()
ensureVisible ()

其它 Qt 5 发行的补充