Qt 5.5 中的新类和函数

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

新类

A
QAbstractVideoFilter
QAbstractAxisInput ( Qt3DInput )
QAxisSetting ( Qt3DInput )
QAbstractTexture ( Qt3DRender )
QAbstractTextureImage ( Qt3DRender )
B
QBlendEquationArguments ( Qt3DRender )
C
QCameraViewfinderSettings
QCameraViewfinderSettingsControl2
QComponent ( Qt3DCore )
QCamera ( Qt3DRender )
QCameraLens ( Qt3DRender )
QCameraSelector ( Qt3DRender )
QClipPlane ( Qt3DRender )
E
QEntity ( Qt3DCore )
F
FrameRateRange ( QCamera )
QFrameAction ( Qt3DLogic )
QFilterKey ( Qt3DRender )
QFrameGraphNode ( Qt3DRender )
G
QGraphicsApiFilter ( Qt3DRender )
I
QInputAspect ( Qt3DInput )
QInputDeviceIntegration ( Qt3DInput )
K
QKeyEvent ( Qt3DInput )
QKeyboardDevice ( Qt3DInput )
QKeyboardHandler ( Qt3DInput )
L
QLayer ( Qt3DRender )
QLayerFilter ( Qt3DRender )
M
QMouseDevice ( Qt3DInput )
QMouseEvent ( Qt3DInput )
QMouseHandler ( Qt3DInput )
QMaterial ( Qt3DRender )
N
QNode ( Qt3DCore )
QNoDraw ( Qt3DRender )
O
QOpenGLFunctions_4_4_Compatibility
QOpenGLFunctions_4_4_Core
QOpenGLFunctions_4_5_Compatibility
QOpenGLFunctions_4_5_Core
P
QPlatformSurfaceEvent
QPointLight ( Qt3DRender )
R
QRenderStateSet ( Qt3DRender )
S
QSslEllipticCurve
QSslPreSharedKeyAuthenticator
QSkyboxEntity ( Qt3DExtras )
QShaderData ( Qt3DRender )
QShaderProgram ( Qt3DRender )
QSpotLight ( Qt3DRender )
T
QTexture1D ( Qt3DRender )
QTexture1DArray ( Qt3DRender )
QTexture2D ( Qt3DRender )
QTexture2DArray ( Qt3DRender )
QTexture2DMultisample ( Qt3DRender )
QTexture2DMultisampleArray ( Qt3DRender )
QTexture3D ( Qt3DRender )
QTextureBuffer ( Qt3DRender )
QTextureCubeMap ( Qt3DRender )
QTextureCubeMapArray ( Qt3DRender )
QTextureImage ( Qt3DRender )
QTextureImageData ( Qt3DRender )
QTextureRectangle ( Qt3DRender )
QTextureWrapMode ( Qt3DRender )
V
QVideoFilterRunnable
W
QWebEngineProfile
QWebEngineScript
QWebEngineScriptCollection
QWindowsWindowFunctions
QWheelEvent ( Qt3DInput )

新成员函数

QBluetoothHostInfo :

operator!= (const QBluetoothHostInfo & other ) const
operator== (const QBluetoothHostInfo & other ) const

QBluetoothDeviceInfo :

deviceUuid () const
setDeviceUuid (const QBluetoothUuid & uuid )

QLowEnergyController :

remoteName () const

QLowEnergyService :

characteristicRead (const QLowEnergyCharacteristic & characteristic , const QByteArray & value )
descriptorRead (const QLowEnergyDescriptor & descriptor , const QByteArray & value )
readCharacteristic (const QLowEnergyCharacteristic & characteristic )
readDescriptor (const QLowEnergyDescriptor & descriptor )

QDebug :

operator<< (char16_t t )
operator<< (char32_t t )

QLoggingCategory :

isInfoEnabled () const

QMessageLogger :

info () const
info (QMessageLogger::CategoryFunction catFunc ) const
info (const QLoggingCategory & cat ) const
info (QMessageLogger::CategoryFunction catFunc , const char * msg , ... ) const
info (const QLoggingCategory & cat , const char * msg , ... ) const
info (const char * msg , ... ) const

QAssociativeIterable :

find (const QVariant & key ) const

QDateTime :

fromCFDate (CFDateRef date )
fromNSDate (const NSDate * date )
toCFDate () const
toNSDate () const

QItemSelectionModel :

model ()
modelChanged (QAbstractItemModel * model )
setModel (QAbstractItemModel * model )

QJsonObject :

fromVariantHash (const QVariantHash & hash )
toVariantHash () const

QMetaEnum :

fromType ()

QMetaMethod :

invokeOnGadget (void * gadget , QGenericArgument val0 , QGenericArgument val1 , QGenericArgument val2 , QGenericArgument val3 , QGenericArgument val4 , QGenericArgument val5 , QGenericArgument val6 , QGenericArgument val7 , QGenericArgument val8 , QGenericArgument val9 ) const
invokeOnGadget (void * gadget , QGenericReturnArgument returnValue , QGenericArgument val0 , QGenericArgument val1 , QGenericArgument val2 , QGenericArgument val3 , QGenericArgument val4 , QGenericArgument val5 , QGenericArgument val6 , QGenericArgument val7 , QGenericArgument val8 , QGenericArgument val9 ) const

QMetaProperty :

readOnGadget (const void * gadget ) const
resetOnGadget (void * gadget ) const
writeOnGadget (void * gadget , const QVariant & value ) const

QMetaType :

等于 (const void * lhs , const void * rhs , int typeId , int * result )
metaObject () const
registerEqualsComparator ()
type (const ::QByteArray & typeName )

QPair :

swap (QPair<T1, T2> & other )

QRegularExpression :

globalMatch (const QStringRef & subjectRef , int offset , QRegularExpression::MatchType matchType , QRegularExpression::MatchOptions matchOptions ) const
match (const QStringRef & subjectRef , int offset , QRegularExpression::MatchType matchType , QRegularExpression::MatchOptions matchOptions ) const

QState :

addTransition (const QObject * sender , PointerToMemberFunction signal , QAbstractState * target )

QString :

asprintf (const char * cformat , ... )
fromStdU16String (const std::u16string & str )
fromStdU32String (const std::u32string & str )
indexOf (const QRegularExpression & re , int from , QRegularExpressionMatch * rmatch ) const
insert (int position , const QByteArray & str )
insert (int position , const QStringRef & str )
insert (int position , const char * str )
lastIndexOf (const QRegularExpression & re , int from , QRegularExpressionMatch * rmatch ) const
prepend (const QChar * str , int len )
prepend (const QStringRef & str )
toStdU16String () const
toStdU32String () const
vasprintf (const char * cformat , va_list ap )

QTextStream :

readLineInto (QString * line , qint64 maxlen )

QThread :

loopLevel () const

QTimeZone :

systemTimeZone ()
utc ()

QVarLengthArray :

operator= (std::initializer_list<T> list )

QVariant :

toPersistentModelIndex () const

QVector :

append (const QVector<T> & value )

QDBusConnection :

registerObject (const QString & path , const QString & interface , QObject * object , QDBusConnection::RegisterOptions options )

QImageReader :

autoTransform () const
setAutoTransform (bool enabled )
transformation () const

QImageWriter :

optimizedWrite () const
progressiveScanWrite () const
setOptimizedWrite (bool optimize )
setProgressiveScanWrite (bool progressive )
setTransformation (QImageIOHandler::Transformations transform )
transformation () const

QOpenGLContext :

globalShareContext ()
supportsThreadedOpenGL ()

QMatrix4x4 :

isAffine () const

QOpenGLTexture :

allocateStorage (QOpenGLTexture::PixelFormat pixelFormat , QOpenGLTexture::PixelType pixelType )
comparisonFunction () const
comparisonMode () const
setComparisonMode (QOpenGLTexture::ComparisonMode mode )

QQuaternion :

conjugated () const
dotProduct (const QQuaternion & q1 , const QQuaternion & q2 )
fromAxes (const QVector3D & xAxis , const QVector3D & yAxis , const QVector3D & zAxis )
fromDirection (const QVector3D & direction , const QVector3D & up )
fromEulerAngles (const QVector3D & eulerAngles )
fromEulerAngles (float pitch , float yaw , float roll )
fromRotationMatrix (const QMatrix3x3 & rot3x3 )
getAxes (QVector3D * xAxis , QVector3D * yAxis , QVector3D * zAxis ) const
getAxisAndAngle (QVector3D * axis , float * angle ) const
getAxisAndAngle (float * x , float * y , float * z , float * angle ) const
getEulerAngles (float * pitch , float * yaw , float * roll ) const
inverted () const
rotationTo (const QVector3D & from , const QVector3D & to )
toEulerAngles () const
toRotationMatrix () const

QVector2D :

operator/= (const QVector2D & vector )

QVector4D :

operator/= (const QVector4D & vector )

QVector3D :

operator/= (const QVector3D & vector )
project (const QMatrix4x4 & modelView , const QMatrix4x4 & projection , const QRect & viewport ) const
unproject (const QMatrix4x4 & modelView , const QMatrix4x4 & projection , const QRect & viewport ) const

QWheelEvent :

source () const

QWindow :

requestUpdate ()

QFontDatabase :

isPrivateFamily (const QString & family ) const

QTextDocument :

find (const QRegularExpression & expr , const QTextCursor & cursor , QTextDocument::FindFlags options ) const
find (const QRegularExpression & expr , int from , QTextDocument::FindFlags options ) const

QPlatformFontDatabase :

weightFromInteger (int weight )

QPlatformIntegration :

virtual destroy ()
virtual setApplicationIcon (const QIcon & icon ) const

QCamera :

setViewfinderSettings (const QCameraViewfinderSettings & settings )
supportedViewfinderFrameRateRanges (const QCameraViewfinderSettings & settings ) const
supportedViewfinderPixelFormats (const QCameraViewfinderSettings & settings ) const
supportedViewfinderResolutions (const QCameraViewfinderSettings & settings ) const
supportedViewfinderSettings (const QCameraViewfinderSettings & settings ) const
viewfinderSettings () const

QCameraImageProcessing :

colorFilter () const
isColorFilterSupported (QCameraImageProcessing::ColorFilter filter ) const
setColorFilter (QCameraImageProcessing::ColorFilter filter )

QHostAddress :

setAddress (const quint8 * ip6Addr )

QNetworkAccessManager :

preSharedKeyAuthenticationRequired (QNetworkReply * reply , QSslPreSharedKeyAuthenticator * authenticator )

QNetworkReply :

preSharedKeyAuthenticationRequired (QSslPreSharedKeyAuthenticator * authenticator )

QSslConfiguration :

ellipticCurves () const
setEllipticCurves (const QVector<QSslEllipticCurve> & curves )
supportedCiphers ()
supportedEllipticCurves ()
systemCaCertificates ()

QSslSocket :

preSharedKeyAuthenticationRequired (QSslPreSharedKeyAuthenticator * authenticator )

QGeoCircle :

toString () const

QGeoRectangle :

toString () const

QGeoShape :

center () const
toString () const

QQuickWidget :

quickWindow () const

QSGSimpleTextureNode :

setSourceRect (const QRectF & r )
setSourceRect (qreal x , qreal y , qreal w , qreal h )
sourceRect () const

QAbstractScrollArea :

viewportMargins () const

QFrame :

initStyleOption (QStyleOptionFrame * option ) const

QGraphicsScene :

setSelectionArea (const QPainterPath & path , Qt::ItemSelectionOperation selectionOperation , Qt::ItemSelectionMode mode , const QTransform & deviceTransform )

QOpenGLWidget :

setUpdateBehavior (QOpenGLWidget::UpdateBehavior updateBehavior )
updateBehavior () const

QPlainTextEdit :

createStandardContextMenu (const QPoint & position )

QSpacerItem :

sizePolicy () const

名称空间中的新函数

toString (QSizePolicy::Policy p )
toString (QSizePolicy::ControlTypes cts )
toString (QSizePolicy::ControlType ct )
toString (QSizePolicy sp )

新全局函数

operator!= (const QSslPreSharedKeyAuthenticator & lhs , const QSslPreSharedKeyAuthenticator & rhs )
operator!= (QSslEllipticCurve lhs , QSslEllipticCurve rhs )
operator!= (const QCameraViewfinderSettings & lhs , const QCameraViewfinderSettings & rhs )
operator* (const QQuaternion & quaternion , const QVector3D & vec )
operator/ (const QVector4D & vector , const QVector4D & divisor )
operator/ (const QVector3D & vector , const QVector3D & divisor )
operator/ (const QVector2D & vector , const QVector2D & divisor )
operator<< (QDebug debug , QSslEllipticCurve curve )
operator<= (const QUuid & lhs , const QUuid & rhs )
operator== (const QSslPreSharedKeyAuthenticator & lhs , const QSslPreSharedKeyAuthenticator & rhs )
operator== (QSslEllipticCurve lhs , QSslEllipticCurve rhs )
operator== (const QCameraViewfinderSettings & lhs , const QCameraViewfinderSettings & rhs )
operator>= (const QUuid & lhs , const QUuid & rhs )
qEnvironmentVariableIntValue (const char * varName , bool * ok )
qHash (QSslEllipticCurve curve , uint seed )
qHash (const QSet<T> & key , uint seed )
qHashRange (InputIterator first , InputIterator last , uint seed )
qHashRangeCommutative (InputIterator first , InputIterator last , uint seed )
qPixelFormatAlpha (uchar channelSize , QPixelFormat::TypeInterpretation typeInterpretation )
qjsEngine (const QObject * object )
swap (QPair<T1, T2> & lhs , QPair<T1, T2> & rhs )

新宏

Q_ENUM ( ... )
Q_FLAG ( ... )
qCInfo ( category , const char * message , ... )
qCInfo ( category )
qInfo (const char * message , ... )

新枚举类型

enum ColorFilter { ColorFilterNone, ColorFilterGrayscale, ColorFilterNegative, ColorFilterSolarize, ..., ColorFilterVendor }
enum Transformation { TransformationNone, TransformationMirror, TransformationFlip, TransformationRotate180, ..., TransformationRotate270 }
enum ComparisonFunction { CompareLessEqual, CompareGreaterEqual, CompareLess, CompareGreater, ..., CompareNever }
enum ComparisonMode { CompareRefToTexture, CompareNone }
enum UpdateBehavior { NoPartialUpdate, PartialUpdate }
enum TabFocusBehavior { NoTabFocus, TabFocusTextControls, TabFocusListControls, TabFocusAllControls }

新特性

新 QML 类型

A
AbstractAxisInput
AbstractTextureImage
AxisSetting
B
BlendEquation
BlendEquationArguments
C
Camera
CameraLens
CameraSelector
CircularGauge
CircularGaugeStyle
ClipPlane
Component3D
D
DelayButton
DelayButtonStyle
Dial
DialStyle
E
Entity
EntityLoader
F
FilterKey
FrameAction
FrameGraphNode
G
Gauge
GaugeStyle
GraphicsApiFilter
I
ItemSelectionModel
K
KeyEvent
KeyboardDevice
KeyboardHandler
L
LayerFilter
M
Material
MouseDevice
MouseEvent
MouseHandler
N
NoDraw
Node
NodeInstantiator
P
PieMenu
PieMenuStyle
PointLight
R
RenderStateSet
S
ShaderProgram
Shortcut
SkyboxEntity
SpotLight
StatusIndicator
StatusIndicatorStyle
T
TextureImage
ToggleButton
ToggleButtonStyle
TreeView
TreeViewStyle
Tumbler
TumblerColumn
TumblerStyle
W
WheelEvent

新 QML 特性

autoTransform
colorFilter
direction
height
polling
scrollGestureEnabled
shortcuts
styleHints
width

新 QML 信号

tagFound ()
tagRemoved ()
smartZoom ()

新 QML 方法

supportedViewfinderFrameRateRanges ()
supportedViewfinderResolutions ()
getDataAsArrayBuffer ()
hsva ()
shapeToCircle ()
shapeToRectangle ()

其它 Qt 5 发行的补充