Qt 5.8 中的新类和函数

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

新名称空间

namespace QScxmlExecutableContent

新类

A
QAbstractOAuth
QAbstractOAuth2
QAbstractOAuthReplyHandler
AssignmentInfo ( QScxmlExecutableContent )
QAbstractPhysicalDeviceProxy ( Qt3DInput )
QAxisAccumulator ( Qt3DInput )
C
QCanBus
QCanBusDevice
QCanBusFactory
QCanBusFrame
QCandlestickLegendMarker
QCandlestickModelMapper
QCandlestickSeries
QCandlestickSet
D
QDeadlineTimer
E
EvaluatorInfo ( QScxmlExecutableContent )
F
Filter ( QCanBusDevice )
ForeachLoopBody ( QScxmlDataModel )
ForeachInfo ( QScxmlExecutableContent )
H
QHCandlestickModelMapper
I
InvokeInfo ( QScxmlExecutableContent )
L
Loader ( QScxmlCompiler )
M
QModbusClient
QModbusDataUnit
QModbusDevice
QModbusDeviceIdentification
QModbusExceptionResponse
QModbusPdu
QModbusReply
QModbusRequest
QModbusResponse
QModbusRtuSerialMaster
QModbusRtuSerialSlave
QModbusServer
QModbusTcpClient
QModbusTcpServer
N
QNetworkDatagram
O
QOAuth1
QOAuth1Signature
QOAuth2AuthorizationCodeFlow
QOpenGLTextureBlitter
P
QPointingDeviceUniqueId
ParameterInfo ( QScxmlExecutableContent )
QPaintedTextureImage ( Qt3DRender )
R
QRenderCapture ( Qt3DRender )
QRenderCaptureReply ( Qt3DRender )
S
QSGImageNode
QSGRectangleNode
QSGRenderNode
QSGRendererInterface
QSctpServer
QSctpSocket
QScxmlDynamicScxmlServiceFactory
QScxmlInvokableService
QScxmlInvokableServiceFactory
QScxmlStaticScxmlServiceFactory
QScxmlTableData
QSslDiffieHellmanParameters
T
TimeStamp ( QCanBusFrame )
TakeRowResult ( QFormLayout )
V
QVCandlestickModelMapper
W
QWaylandBufferRef
QWaylandClient
QWaylandCompositor
QWaylandIviApplication
QWaylandIviSurface
QWaylandKeyboard
QWaylandOutput
QWaylandOutputMode
QWaylandPointer
QWaylandQuickItem
QWaylandQuickShellSurfaceItem
QWaylandSeat
QWaylandShellSurface
QWaylandSurface
QWaylandSurfaceGrabber
QWaylandTouch
QWaylandView
QWaylandWlShell
QWaylandWlShellSurface
QWaylandXdgPopupV5
QWaylandXdgShellV5
QWaylandXdgSurfaceV5

新成员函数

QBluetoothDeviceDiscoveryAgent :

lowEnergyDiscoveryTimeout () const
setLowEnergyDiscoveryTimeout (int timeout )
start (QBluetoothDeviceDiscoveryAgent::DiscoveryMethods methods )
supportedDiscoveryMethods ()

QLowEnergyController :

remoteDeviceUuid () const

QCommandLineOption :

flags () const
setFlags (QCommandLineOption::Flags flags )

QDateTime :

currentSecsSinceEpoch ()
fromSecsSinceEpoch (qint64 secs , Qt::TimeSpec spec , int offsetSeconds )
fromSecsSinceEpoch (qint64 secs , const QTimeZone & timeZone )
setSecsSinceEpoch (qint64 secs )
toSecsSinceEpoch () const

QLatin1String :

at (int pos ) const
left (int length ) const
mid (int start ) const
mid (int start , int length ) const
operator[] (int pos ) const
right (int length ) const

QLine :

center () const

QLineF :

center () const

QMetaEnum :

isScoped () const

QMutex :

try_lock ()
try_lock_for (std::chrono::duration<Rep, Period> duration )
try_lock_until (std::chrono::time_point<Clock, Duration> timePoint )

QPoint :

toCGPoint () const

QPointF :

fromCGPoint (CGPoint point )
toCGPoint () const

QRect :

toCGRect () const

QRectF :

fromCGRect (CGRect rect )
toCGRect () const

QSize :

toCGSize () const

QSizeF :

fromCGSize (CGSize size )
toCGSize () const

QStringList :

join (QLatin1String separator ) const

QStringRef :

chop (int n )
compare (const QByteArray & other , Qt::CaseSensitivity cs ) const

QTimer :

intervalAsDuration () const
remainingTimeAsDuration () const
singleShot (std::chrono::milliseconds msec , Qt::TimerType timerType , const QObject * receiver , const char * member )
singleShot (std::chrono::milliseconds msec , const QObject * receiver , const char * member )
start (std::chrono::milliseconds msec )

QWaitCondition :

notify_all ()
notify_one ()

QLibraryInfo :

version ()

QOpenGLContext :

getProcAddress (const char * procName ) const

QColor :

isValidColor (QLatin1String name )
setNamedColor (QLatin1String name )

QRegion :

begin () const
cbegin () const
cend () const
crbegin () const
crend () const
end () const
rbegin () const
rend () const

TouchPoint :

rotation () const
uniqueId () const

QAbstractTextDocumentLayout :

formatAt (const QPointF & pos ) const
imageAt (const QPointF & pos ) const

QFontMetricsF :

capHeight () const

QFontMetrics :

capHeight () const

QRawFont :

capHeight () const

QPlatformTheme :

virtual fileIcon (const QFileInfo & fileInfo , QPlatformTheme::IconOptions iconOptions ) const

QHostAddress :

isEqual (const QHostAddress & other , QHostAddress::ConversionMode mode ) const
operator= (QHostAddress::SpecialAddress address )
setAddress (QHostAddress::SpecialAddress address )

QNetworkAccessManager :

sendCustomRequest (const QNetworkRequest & request , const QByteArray & verb , QHttpMultiPart * multiPart )
sendCustomRequest (const QNetworkRequest & request , const QByteArray & verb , const QByteArray & data )

QNetworkProxyFactory :

usesSystemConfiguration ()

QSslConfiguration :

diffieHellmanParameters () const
preSharedKeyIdentityHint () const
setDiffieHellmanParameters (const QSslDiffieHellmanParameters & dhparams )
setPreSharedKeyIdentityHint (const QByteArray & hint )

QUdpSocket :

receiveDatagram (qint64 maxSize )
writeDatagram (const QNetworkDatagram & datagram )

QJSEngine :

newQMetaObject ()
newQMetaObject (const QMetaObject * metaObject )

QJSValue :

isQMetaObject () const
toQMetaObject () const

QQmlEngine :

exit (int retCode )

QQuickWindow :

createImageNode () const
createNinePatchNode () const
createRectangleNode () const
rendererInterface () const
setSceneGraphBackend (QSGRendererInterface::GraphicsApi api )
setSceneGraphBackend (const QString & backend )

QSGEngine :

createImageNode () const
createNinePatchNode () const
createRectangleNode () const
rendererInterface () const

QQuickStyle :

setFallbackStyle (const QString & style )

QSerialPort :

errorOccurred (QSerialPort::SerialPortError error )

QQuickWebEngineProfile :

spellCheckLanguages () const

QWebSocket :

preSharedKeyAuthenticationRequired (QSslPreSharedKeyAuthenticator * authenticator )

QWebSocketServer :

preSharedKeyAuthenticationRequired (QSslPreSharedKeyAuthenticator * authenticator )

QFormLayout :

removeRow (QLayout * layout )
removeRow (QWidget * widget )
removeRow (int row )
takeRow (QLayout * layout )
takeRow (QWidget * widget )
takeRow (int row )

QMainWindow :

tabifiedDockWidgetActivated (QDockWidget * dockWidget )

QUndoStack :

resetClean ()

名称空间中的新函数

androidContext ()
convertVolume (qreal volume , QAudio::VolumeScale from , QAudio::VolumeScale to )
createTouchDevice (QTouchDevice::DeviceType devType )
toString ( std::nullptr_t )

新全局函数

operator!= (QPointingDeviceUniqueId lhs , QPointingDeviceUniqueId rhs )
operator!= ( std::nullptr_t , const QWeakPointer<T> & rhs )
operator!= ( std::nullptr_t , const QSharedPointer<T> & rhs )
operator!= ( std::nullptr_t , const QScopedPointer<T, Cleanup> & rhs )
operator!= (const QWeakPointer<T> & lhs , std::nullptr_t )
operator!= (const QSharedPointer<T> & lhs , std::nullptr_t )
operator!= (const QScopedPointer<T, Cleanup> & lhs , std::nullptr_t )
operator<< (QDebug debug , const QSslDiffieHellmanParameters & dhparam )
operator== (const QSslDiffieHellmanParameters & lhs , const QSslDiffieHellmanParameters & rhs )
operator== (QPointingDeviceUniqueId lhs , QPointingDeviceUniqueId rhs )
operator== ( std::nullptr_t , const QWeakPointer<T> & rhs )
operator== ( std::nullptr_t , const QSharedPointer<T> & rhs )
operator== ( std::nullptr_t , const QScopedPointer<T, Cleanup> & rhs )
operator== (const QWeakPointer<T> & lhs , std::nullptr_t )
operator== (const QSharedPointer<T> & lhs , std::nullptr_t )
operator== (const QScopedPointer<T, Cleanup> & lhs , std::nullptr_t )
qHash (const QSslDiffieHellmanParameters & dhparam , uint seed )
qHash (const QRawFont & font , uint seed )
qHash (QPointingDeviceUniqueId key , uint seed )
qHash (const QMultiHash<Key, T> & key , uint seed )
qHash (const QHash<Key, T> & key , uint seed )
qmlRegisterUncreatableMetaObject (const QMetaObject & staticMetaObject , const char * uri , int versionMajor , int versionMinor , const char * qmlName , const QString & reason )

新宏

QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
Q_ENUM_NS ( ... )
Q_FALLTHROUGH
Q_FLAG_NS ( ... )
Q_NAMESPACE

新枚举类型

enum VolumeScale { LinearVolumeScale, CubicVolumeScale, LogarithmicVolumeScale, DecibelVolumeScale }
enum DiscoveryMethod { NoMethod, ClassicMethod, LowEnergyMethod }
enum ConversionModeFlag { ConvertV4MappedToIPv4, ConvertV4CompatToIPv4, ConvertUnspecifiedAddress, ConvertLocalHost, TolerantConversion, StrictConversion }
enum LegendMarkerType { LegendMarkerTypeArea, LegendMarkerTypeBar, LegendMarkerTypePie, LegendMarkerTypeXY, LegendMarkerTypeBoxPlot, LegendMarkerTypeCandlestick }
enum anonymous { NoContainer, NoString, NoInstruction, NoEvaluator }

新的 Typedef

typedef QModbusDataUnitMap
typedef const_iterator
typedef const_reverse_iterator
typedef ContainerId
typedef EvaluatorId
typedef InstructionId
typedef StringId

新特性

新 QML 类型

A
AxisAccumulator
B
BorderImageMesh
D
Dialog
DialogButtonBox
I
IviApplication
IviSurface
L
LoggingCategory
M
MenuSeparator
R
RenderCapture
RenderCaptureReply
RoundButton
S
ShellSurface
ShellSurfaceItem
T
ToolSeparator
W
WaylandClient
WaylandCompositor
WaylandOutput
WaylandQuickItem
WaylandSeat
WaylandSurface
WaylandView
WlShell
WlShellSurface
X
XdgPopupV5
XdgShellV5
XdgSurfaceV5

新 QML 特性

delayed
font.hintingPreference
font.hintingPreference
font.hintingPreference
imageSource
overwriteMode
overwriteMode

新 QML 信号

binaryMessageReceived ()

新 QML 方法

convertVolume ()
tryVerify ()
sendBinaryMessage ()

其它 Qt 5 发行的补充