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
QAbstractAxisInput ( Qt3DInput )
QAbstractTexture ( Qt3DRender )
QAbstractTextureImage ( Qt3DRender )
QAbstractVideoFilter
QAxisSetting ( Qt3DInput )
B
QBlendEquationArguments ( Qt3DRender )
C
QCamera ( Qt3DRender )
QCameraLens ( Qt3DRender )
QCameraSelector ( Qt3DRender )
QCameraViewfinderSettings
QCameraViewfinderSettingsControl2
QClipPlane ( Qt3DRender )
QComponent ( Qt3DCore )
E
QEntity ( Qt3DCore )
F
FrameRateRange ( QCamera )
QFilterKey ( Qt3DRender )
QFrameAction ( Qt3DLogic )
QFrameGraphNode ( Qt3DRender )
G
QGraphicsApiFilter ( Qt3DRender )
I
QInputAspect ( Qt3DInput )
QInputDeviceIntegration ( Qt3DInput )
K
QKeyboardDevice ( Qt3DInput )
QKeyboardHandler ( Qt3DInput )
QKeyEvent ( Qt3DInput )
L
QLayer ( Qt3DRender )
QLayerFilter ( Qt3DRender )
M
QMaterial ( Qt3DRender )
QMouseDevice ( Qt3DInput )
QMouseEvent ( Qt3DInput )
QMouseHandler ( Qt3DInput )
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
QShaderData ( Qt3DRender )
QShaderProgram ( Qt3DRender )
QSkyboxEntity ( Qt3DExtras )
QSpotLight ( Qt3DRender )
QSslEllipticCurve
QSslPreSharedKeyAuthenticator
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
QWheelEvent ( Qt3DInput )
QWindowsWindowFunctions

新成员函数

QBluetoothDeviceInfo :

QBluetoothUuid deviceUuid () const
void setDeviceUuid (const QBluetoothUuid & uuid )

QBluetoothHostInfo :

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

QLowEnergyController :

QString remoteName () const

QLowEnergyService :

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

QAssociativeIterable :

QAssociativeIterable::const_iterator find (const QVariant & key ) const

FromBase64Result :

uint qHash (const QSet<T> & key , uint seed )

QChar :

bool operator<= (const QUuid & lhs , const QUuid & rhs )
bool operator>= (const QUuid & lhs , const QUuid & rhs )

QDateTime :

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

QDebug :

QDebug & operator<< (char16_t t )
QDebug & operator<< (char32_t t )

QHash :

uint qHash (const QSet<T> & key , uint seed )
uint qHashRange (InputIterator first , InputIterator last , uint seed )
uint qHashRangeCommutative (InputIterator first , InputIterator last , uint seed )

QItemSelectionModel :

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

QJsonObject :

QJsonObject fromVariantHash (const QVariantHash & hash )
QVariantHash toVariantHash () const

QList :

bool operator<= (const QUuid & lhs , const QUuid & rhs )
bool operator>= (const QUuid & lhs , const QUuid & rhs )
uint qHash (const QSet<T> & key , uint seed )

QLocale :

uint qHash (const QSet<T> & key , uint seed )

QLoggingCategory :

bool isInfoEnabled () const

QMessageLogger :

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

QMetaEnum :

QMetaEnum fromType ()

QMetaMethod :

bool 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
bool invokeOnGadget (void * gadget , QGenericArgument val0 , QGenericArgument val1 , QGenericArgument val2 , QGenericArgument val3 , QGenericArgument val4 , QGenericArgument val5 , QGenericArgument val6 , QGenericArgument val7 , QGenericArgument val8 , QGenericArgument val9 ) const

QMetaProperty :

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

QMetaType :

bool equals (const void * lhs , const void * rhs , int typeId , int * result )
const QMetaObject * metaObject () const
bool registerEqualsComparator ()
int type (const ::QByteArray & typeName )

QMultiHash :

uint qHash (const QSet<T> & key , uint seed )

QPair :

bool operator<= (const QUuid & lhs , const QUuid & rhs )
bool operator>= (const QUuid & lhs , const QUuid & rhs )
void swap (QPair<T1, T2> & other )

QPersistentModelIndex :

uint qHash (const QSet<T> & key , uint seed )

QRegularExpression :

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

QRegExp :

uint qHash (const QSet<T> & key , uint seed )

QState :

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

QString :

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

QStringView :

uint qHash (const QSet<T> & key , uint seed )

QTextStream :

bool readLineInto (QString * line , qint64 maxlen )

QThread :

int loopLevel () const

QTimeZone :

QTimeZone systemTimeZone ()
QTimeZone utc ()

QVarLengthArray :

bool operator<= (const QUuid & lhs , const QUuid & rhs )
QVarLengthArray<T, Prealloc> & operator= (std::initializer_list<T> list )
bool operator>= (const QUuid & lhs , const QUuid & rhs )
uint qHash (const QSet<T> & key , uint seed )

QUuid :

bool operator<= (const QUuid & lhs , const QUuid & rhs )
bool operator>= (const QUuid & lhs , const QUuid & rhs )

QVariant :

QPersistentModelIndex toPersistentModelIndex () const

QVector :

void append (const QVector<T> & value )
bool operator<= (const QUuid & lhs , const QUuid & rhs )
bool operator>= (const QUuid & lhs , const QUuid & rhs )
uint qHash (const QSet<T> & key , uint seed )

QDBusConnection :

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

QFontDatabase :

bool isPrivateFamily (const QString & family ) const

QGenericMatrix :

QVector3D operator* (const QQuaternion & quaternion , const QVector3D & vec )
const QVector3D operator/ (const QVector3D & vector , const QVector3D & divisor )
const QVector4D operator/ (const QVector4D & vector , const QVector4D & divisor )

QImageReader :

bool autoTransform () const
void setAutoTransform (bool enabled )
QImageIOHandler::Transformations transformation () const

QImageWriter :

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

QMatrix4x4 :

bool isAffine () const

QOpenGLContext :

QOpenGLContext * globalShareContext ()
bool supportsThreadedOpenGL ()

QOpenGLTexture :

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

QPixelFormat :

QPixelFormat qPixelFormatAlpha (uchar channelSize , QPixelFormat::TypeInterpretation typeInterpretation )

QPlatformFontDatabase :

QFont::Weight weightFromInteger (int weight )

QPlatformIntegration :

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

QQuaternion :

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

QTextDocument :

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

QVector2D :

QVector3D operator* (const QQuaternion & quaternion , const QVector3D & vec )
const QVector2D operator/ (const QVector2D & vector , const QVector2D & divisor )
const QVector3D operator/ (const QVector3D & vector , const QVector3D & divisor )
const QVector4D operator/ (const QVector4D & vector , const QVector4D & divisor )
QVector2D & operator/= (const QVector2D & vector )

QVector3D :

QVector3D operator* (const QQuaternion & quaternion , const QVector3D & vec )
const QVector3D operator/ (const QVector3D & vector , const QVector3D & divisor )
const QVector4D operator/ (const QVector4D & vector , const QVector4D & divisor )
QVector3D & operator/= (const QVector3D & vector )
QVector3D project (const QMatrix4x4 & modelView , const QMatrix4x4 & projection , const QRect & viewport ) const
QVector3D unproject (const QMatrix4x4 & modelView , const QMatrix4x4 & projection , const QRect & viewport ) const

QVector4D :

QVector3D operator* (const QQuaternion & quaternion , const QVector3D & vec )
const QVector4D operator/ (const QVector4D & vector , const QVector4D & divisor )
QVector4D & operator/= (const QVector4D & vector )

QWheelEvent :

Qt::MouseEventSource source () const

QWindow :

void requestUpdate ()

QCamera :

void setViewfinderSettings (const QCameraViewfinderSettings & settings )
QList<QCamera::FrameRateRange> supportedViewfinderFrameRateRanges (const QCameraViewfinderSettings & settings ) const
QList<QVideoFrame::PixelFormat> supportedViewfinderPixelFormats (const QCameraViewfinderSettings & settings ) const
QList<QSize> supportedViewfinderResolutions (const QCameraViewfinderSettings & settings ) const
QList<QCameraViewfinderSettings> supportedViewfinderSettings (const QCameraViewfinderSettings & settings ) const
QCameraViewfinderSettings viewfinderSettings () const

QCameraImageProcessing :

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

QCameraViewfinderSettings :

bool operator!= (const QCameraViewfinderSettings & lhs , const QCameraViewfinderSettings & rhs )
bool operator== (const QCameraViewfinderSettings & lhs , const QCameraViewfinderSettings & rhs )

QHostAddress :

QDebug operator<< (QDebug debug , QSslEllipticCurve curve )
uint qHash (QSslEllipticCurve curve , uint seed )
void setAddress (const quint8 * ip6Addr )

QNetworkAccessManager :

void preSharedKeyAuthenticationRequired (QNetworkReply * reply , QSslPreSharedKeyAuthenticator * authenticator )

QNetworkCacheMetaData :

QDebug operator<< (QDebug debug , QSslEllipticCurve curve )

QNetworkReply :

void preSharedKeyAuthenticationRequired (QSslPreSharedKeyAuthenticator * authenticator )

QOcspResponse :

bool operator!= (QSslEllipticCurve lhs , QSslEllipticCurve rhs )
bool operator== (QSslEllipticCurve lhs , QSslEllipticCurve rhs )

QSslConfiguration :

QVector<QSslEllipticCurve> ellipticCurves () const
void setEllipticCurves (const QVector<QSslEllipticCurve> & curves )
QList<QSslCipher> supportedCiphers ()
QVector<QSslEllipticCurve> supportedEllipticCurves ()
QList<QSslCertificate> systemCaCertificates ()

QSslDiffieHellmanParameters :

QDebug operator<< (QDebug debug , QSslEllipticCurve curve )
bool operator== (QSslEllipticCurve lhs , QSslEllipticCurve rhs )
uint qHash (QSslEllipticCurve curve , uint seed )

QSslEllipticCurve :

bool operator!= (QSslEllipticCurve lhs , QSslEllipticCurve rhs )
QDebug operator<< (QDebug debug , QSslEllipticCurve curve )
bool operator== (QSslEllipticCurve lhs , QSslEllipticCurve rhs )

QSslPreSharedKeyAuthenticator :

bool operator!= (const QSslPreSharedKeyAuthenticator & lhs , const QSslPreSharedKeyAuthenticator & rhs )
bool operator!= (QSslEllipticCurve lhs , QSslEllipticCurve rhs )
bool operator== (const QSslPreSharedKeyAuthenticator & lhs , const QSslPreSharedKeyAuthenticator & rhs )
bool operator== (QSslEllipticCurve lhs , QSslEllipticCurve rhs )

QSslSocket :

void preSharedKeyAuthenticationRequired (QSslPreSharedKeyAuthenticator * authenticator )

QGeoCircle :

QString toString () const

QGeoRectangle :

QString toString () const

QGeoShape :

QGeoCoordinate center () const
QString toString () const

QJSEngine :

QJSEngine * qjsEngine (const QObject * object )

QQuickWidget :

QQuickWindow * quickWindow () const

QSGSimpleTextureNode :

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

QAbstractScrollArea :

QMargins viewportMargins () const

QFrame :

void initStyleOption (QStyleOptionFrame * option ) const

QGraphicsScene :

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

QOpenGLWidget :

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

QPlainTextEdit :

QMenu * createStandardContextMenu (const QPoint & position )

QSpacerItem :

QSizePolicy sizePolicy () const

名称空间中的新函数

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

新全局函数

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

新宏

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

新枚举类型

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

新特性

新 QML 类型

A
AbstractAxisInput
AbstractTexture
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
KeyboardDevice
KeyboardHandler
KeyEvent
L
LayerFilter
M
Material
MouseDevice
MouseEvent
MouseHandler
N
Node
NodeInstantiator
NoDraw
P
PieMenu
PieMenuStyle
PointLight
R
RenderStateSet
S
ShaderProgram
Shortcut
SkyboxEntity
SpotLight
StatusIndicator
StatusIndicatorStyle
T
Texture1D
Texture1DArray
Texture2D
Texture2DArray
Texture2DMultisample
Texture2DMultisampleArray
Texture3D
TextureBuffer
TextureCubeMap
TextureCubeMapArray
TextureImage
TextureRectangle
ToggleButton
ToggleButtonStyle
TreeView
TreeViewStyle
Tumbler
TumblerColumn
TumblerStyle
W
WheelEvent

新 QML 特性

  autoTransform
  colorFilter
  direction
  height
  polling
  scrollGestureEnabled
  shortcuts
  styleHints
  width

新 QML 信号

  smartZoom ()
  tagFound ()
  tagRemoved ()

新 QML 方法

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

其它 Qt 5 发行的补充