Qt 5.7 中的新类和函数

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

新类

A
AddressInfo ( QLowEnergyAdvertisingParameters )
QAbstractActionInput ( Qt3DInput )
QAbstractFunctor ( Qt3DRender )
QAction ( Qt3DInput )
QActionInput ( Qt3DInput )
QAlphaCoverage ( Qt3DRender )
QAlphaTest ( Qt3DRender )
QAnalogAxisInput ( Qt3DInput )
QAxis ( Qt3DInput )
B
QBlendEquation ( Qt3DRender )
QButtonAxisInput ( Qt3DInput )
C
QClearBuffers ( Qt3DRender )
QColorMask ( Qt3DRender )
QComputeCommand ( Qt3DRender )
QConeGeometry ( Qt3DExtras )
QCuboidGeometry ( Qt3DExtras )
QCullFace ( Qt3DRender )
QCylinderGeometry ( Qt3DExtras )
D
QDepthTest ( Qt3DRender )
QDiffuseMapMaterial ( Qt3DExtras )
QDiffuseSpecularMapMaterial ( Qt3DExtras )
QDirectionalLight ( Qt3DRender )
QDispatchCompute ( Qt3DRender )
QDithering ( Qt3DRender )
E
QEffect ( Qt3DRender )
F
QFirstPersonCameraController ( Qt3DExtras )
QForwardRenderer ( Qt3DExtras )
QFrontFace ( Qt3DRender )
QFrustumCulling ( Qt3DRender )
G
QGeometry ( Qt3DRender )
QGeometryRenderer ( Qt3DRender )
QGoochMaterial ( Qt3DExtras )
I
QInputChord ( Qt3DInput )
QInputSequence ( Qt3DInput )
QInputSettings ( Qt3DInput )
L
QLogicAspect ( Qt3DLogic )
QLowEnergyAdvertisingData
QLowEnergyAdvertisingParameters
QLowEnergyCharacteristicData
QLowEnergyConnectionParameters
QLowEnergyDescriptorData
QLowEnergyServiceData
M
QMorphPhongMaterial ( Qt3DExtras )
QMultiSampleAntiAliasing ( Qt3DRender )
N
QNodeCreatedChange ( Qt3DCore )
QNodeDestroyedChange ( Qt3DCore )
QNoDepthMask ( Qt3DRender )
QNormalDiffuseMapAlphaMaterial ( Qt3DExtras )
QNormalDiffuseMapMaterial ( Qt3DExtras )
QNormalDiffuseSpecularMapMaterial ( Qt3DExtras )
O
QOrbitCameraController ( Qt3DExtras )
P
QPerVertexColorMaterial ( Qt3DExtras )
QPhongAlphaMaterial ( Qt3DExtras )
QPhongMaterial ( Qt3DExtras )
QPickEvent ( Qt3DRender )
QPickingSettings ( Qt3DRender )
QPickTriangleEvent ( Qt3DRender )
QPlaneGeometry ( Qt3DExtras )
QPointSize ( Qt3DRender )
QPolygonOffset ( Qt3DRender )
Q
QQuickStyle
R
QRenderAspect ( Qt3DRender )
QRenderPass ( Qt3DRender )
QRenderPassFilter ( Qt3DRender )
QRenderSettings ( Qt3DRender )
QRenderState ( Qt3DRender )
QRenderSurfaceSelector ( Qt3DRender )
QRenderTarget ( Qt3DRender )
QRenderTargetOutput ( Qt3DRender )
QRenderTargetSelector ( Qt3DRender )
S
QSceneLoader ( Qt3DRender )
QScissorTest ( Qt3DRender )
QScxmlCompiler
QScxmlCppDataModel
QScxmlDataModel
QScxmlEcmaScriptDataModel
QScxmlError
QScxmlEvent
QScxmlNullDataModel
QScxmlStateMachine
QSeamlessCubemap ( Qt3DRender )
QSortPolicy ( Qt3DRender )
QSphereGeometry ( Qt3DExtras )
QStaticPropertyUpdatedChangeBase ( Qt3DCore )
QStaticPropertyValueAddedChangeBase ( Qt3DCore )
QStaticPropertyValueRemovedChangeBase ( Qt3DCore )
QStencilMask ( Qt3DRender )
QStencilOperation ( Qt3DRender )
QStencilOperationArguments ( Qt3DRender )
QStencilTest ( Qt3DRender )
QStencilTestArguments ( Qt3DRender )
T
QTechnique ( Qt3DRender )
QTechniqueFilter ( Qt3DRender )
QTextureData ( Qt3DRender )
QTextureImageDataGenerator ( Qt3DRender )
QTorusGeometry ( Qt3DExtras )
V
QViewport ( Qt3DRender )

新成员函数

QAndroidJniObject :

QAndroidJniObject fromLocalRef (jobject localRef )

QBluetoothUuid :

bool operator!= (const QBluetoothUuid & other ) const

QLowEnergyController :

QLowEnergyService * addService (const QLowEnergyServiceData & service , QObject * parent )
void connectionUpdated (const QLowEnergyConnectionParameters & newParameters )
QLowEnergyController * createCentral (const QBluetoothDeviceInfo & remoteDevice , QObject * parent )
QLowEnergyController * createPeripheral (QObject * parent )
void requestConnectionUpdate (const QLowEnergyConnectionParameters & 参数 )
QLowEnergyController::Role role () const
void startAdvertising (const QLowEnergyAdvertisingParameters & 参数 , const QLowEnergyAdvertisingData & advertisingData , const QLowEnergyAdvertisingData & scanResponseData )
void stopAdvertising ()

QBasicMutex :

bool isRecursive () const

QBitArray :

QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )

QByteArray :

QByteArray & append (int count , char ch )
QByteArray & insert (int i , int count , char ch )
QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )
QByteArray & prepend (int count , char ch )

FromBase64Result :

uint qHash (const std::pair<T1, T2> & key , uint seed )

QChar :

QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )

QDataStream :

void abortTransaction ()
bool commitTransaction ()
void rollbackTransaction ()
void startTransaction ()

QDate :

QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )

QDateTime :

QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )

QFlags :

QFlags<T> & setFlag (Enum flag , bool on )

QHash :

QPair<QHash::iterator, QHash::iterator> equal_range (const Key & key )
QPair<QHash::const_iterator, QHash::const_iterator> equal_range (const Key & key ) const
QHash::iterator erase (QHash::const_iterator pos )

QIODevice :

void channelBytesWritten (int channel , qint64 bytes )
void channelReadyRead (int channel )
void commitTransaction ()
int currentReadChannel () const
int currentWriteChannel () const
bool isTransactionStarted () const
int readChannelCount () const
void rollbackTransaction ()
void setCurrentReadChannel (int channel )
void setCurrentWriteChannel (int channel )
void startTransaction ()
int writeChannelCount () const

QJsonObject :

QJsonObject::const_iterator constFind (QLatin1String key ) const
bool contains (QLatin1String key ) const
QJsonObject::iterator find (QLatin1String key )
QJsonObject::const_iterator find (QLatin1String key ) const
QJsonValue operator[] (QLatin1String key ) const
QJsonValueRef operator[] (QLatin1String key )
QJsonValue value (QLatin1String key ) const

QLocale :

QString toCurrencyString (double value , const QString & symbol , int precision ) const

QMetaObject :

bool inherits (const QMetaObject * metaObject ) const

QMutex :

bool isRecursive () const

QPair :

QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )

QProcess :

QProcess::CreateProcessArgumentModifier createProcessArgumentsModifier () const
void setCreateProcessArgumentsModifier (QProcess::CreateProcessArgumentModifier modifier )

QRectF :

QRectF transposed () const

QRect :

QRect transposed () const

QRegExp :

QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )

QSet :

QSet::iterator erase (QSet::const_iterator pos )

QSharedPointer :

QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )

QString :

QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )
void resize (int size , QChar fillChar )

QStringRef :

QStringRef::const_reverse_iterator crbegin () const
QStringRef::const_reverse_iterator crend () const
QChar operator[] (int position ) const
QStringRef::const_reverse_iterator rbegin () const
QStringRef::const_reverse_iterator rend () const

QStringView :

uint qHash (const std::pair<T1, T2> & key , uint seed )

QTime :

QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )

QUtf8 :

QChar * convertToUnicode (QChar * buffer , const char * chars , int len )

QUuid :

QUuid fromCFUUID (CFUUIDRef uuid )
QUuid fromNSUUID (const NSUUID * uuid )
CFUUIDRef toCFUUID () const
NSUUID * toNSUUID () const

QCursor :

void swap (QCursor & other )

QDrag :

void cancel ()

QIconEngine :

bool isNull () const

QOpenGLFramebufferObject :

void blitFramebuffer (QOpenGLFramebufferObject * target , const QRect & targetRect , QOpenGLFramebufferObject * source , const QRect & sourceRect , GLbitfield buffers , GLenum filter , int readColorAttachmentIndex , int drawColorAttachmentIndex , QOpenGLFramebufferObject::FramebufferRestorePolicy restorePolicy )

Key :

bool isValid () const

QPlatformDrag :

virtual void cancelDrag ()

QPlatformIntegration :

virtual void beep () const

QWheelEvent :

bool inverted () const

QMediaPlaylist :

bool moveMedia (int from , int to )

QMediaPlaylistProvider :

virtual bool moveMedia (int from , int to )

QNetworkInterface :

int interfaceIndexFromName (const QString & name )
QString interfaceNameFromIndex (int index )

QSslConfiguration :

QSslKey ephemeralServerKey () const

QWindowsWindowFunctions :

void setWindowActivationBehavior (QWindowsWindowFunctions::WindowActivationBehavior behavior )
const QByteArray setWindowActivationBehaviorIdentifier ()

QQmlDebuggingEnabler :

bool startDebugConnector (const QString & pluginName , const QVariantHash & configuration )

QQmlFileSelector :

QFileSelector * 选择器 () const

QQuickItem :

bool isAncestorOf (const QQuickItem * child ) const
QPointF mapFromGlobal (const QPointF & point ) const
QPointF mapToGlobal (const QPointF & point ) const

QQuickWebEngineProfile :

void clearHttpCache ()

QMenu :

void showTearOffMenu (const QPoint & pos )
void showTearOffMenu ()

QX11Info :

bool isCompositingManagerRunning (int screen )

名称空间中的新函数

QAndroidJniObject androidService ()
void hideSplashScreen ()
void runOnAndroidThread (const QtAndroid::Runnable & runnable )
void runOnAndroidThreadSync (const QtAndroid::Runnable & runnable , int timeoutMs )

新全局函数

QDebug operator<< (QDebug debug , const QSharedPointer<T> & ptr )
QDebug operator<< (QDebug debug , const std::multimap<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::map<Key, T, Compare, Alloc> & map )
QDebug operator<< (QDebug debug , const std::list<T, Alloc> & vec )
QDebug operator<< (QDebug debug , const std::vector<T, Alloc> & vec )
void qAsConst (const T && t )
typename std::add_const<T>::type & qAsConst (T & t )
void qAsConst (const T && t )
typename std::add_const<T>::type & qAsConst (T & t )
auto qConstOverload (T memberFunctionPointer )
auto qConstOverload (T memberFunctionPointer )
uint qHash (const std::pair<T1, T2> & key , uint seed )
auto qNonConstOverload (T memberFunctionPointer )
auto qNonConstOverload (T memberFunctionPointer )
auto qOverload (T functionPointer )
auto qOverload (T functionPointer )

新宏

const wchar_t * qUtf16Printable (const QString & str )
const wchar_t * qUtf16Printable (const QString & str )

新枚举类型

enum AttAccessConstraint { AttAuthorizationRequired, AttAuthenticationRequired, AttEncryptionRequired }
enum FloatingPointPrecisionOption { FloatingPointShortest }
enum Role { CentralRole, PeripheralRole }
enum FramebufferRestorePolicy { DontRestoreFramebufferBinding, RestoreFramebufferBindingToDefault, RestoreFrameBufferBinding }
enum WindowActivationBehavior { DefaultActivateWindow, AlwaysActivateWindow }

新类型别名

typedef const_reverse_iterator
typedef SetWindowActivationBehaviorType

新特性

新 QML 类型

A
AbstractActionInput
AbstractButton
动作
ActionInput
AlphaCoverage
AlphaTest
AnalogAxisInput
ApplicationWindow
Axis
B
BusyIndicator
Button
ButtonAxisInput
ButtonGroup
C
CheckBox
CheckDelegate
ClearBuffers
ColorMask
ComboBox
ComputeCommand
容器
Control
CullFace
D
DepthTest
Dial
DiffuseMapMaterial
DiffuseSpecularMapMaterial
DirectionalLight
DispatchCompute
Dithering
Drawer
E
Effect
F
FirstPersonCameraController
ForwardRenderer
Frame
FrontFace
FrustumCulling
G
几何体
GeometryRenderer
GoochMaterial
GroupBox
I
InputChord
InputSequence
InputSettings
ItemDelegate
L
Label
M
Menu
MenuItem
MultiSampleAntiAliasing
N
NoDepthMask
NormalDiffuseMapAlphaMaterial
NormalDiffuseMapMaterial
NormalDiffuseSpecularMapMaterial
O
OrbitCameraController
P
Page
PageIndicator
Pane
PerVertexColorMaterial
PhongAlphaMaterial
PhongMaterial
PickingSettings
PointSize
PolygonOffset
Popup
ProgressBar
R
RadioButton
RadioDelegate
RangeSlider
RenderPass
RenderPassFilter
RenderSettings
RenderState
RenderSurfaceSelector
RenderTarget
RenderTargetOutput
RenderTargetSelector
S
SceneLoader
ScissorTest
ScrollBar
ScrollIndicator
ScxmlStateMachine
SeamlessCubemap
Slider
SortPolicy
SpinBox
StackView
StencilMask
StencilOperation
StencilOperationArguments
StencilTest
StencilTestArguments
SwipeDelegate
SwipeView
Switch
SwitchDelegate
T
TabBar
TabButton
Technique
TechniqueFilter
TextArea
TextField
ToolBar
ToolButton
ToolTip
Tumbler
V
Viewport

新 QML 特性

brightness
caseSensitive
copyrightsVisible
enabled
invert
keyNavigationEnabled
keyNavigationEnabled
movementDirection
preeditText
preeditText
source
window

新 QML 方法

addItems ()
clear ()
clear ()
insertItems ()
mapFromGlobal ()
mapToGlobal ()
moveItem ()
removeItems ()

其它 Qt 5 发行的补充