Qt 5.12 中的新类和函数

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

新名称空间

namespace QMqtt

新类

B
Builder ( QKnxNetIpTunnelingInfoDibProxy )
C
ConstIterator ( QCborMap )
ConstIterator ( QCborArray )
QCborArray
QCborError
QCborMap
QCborParserError
QCborStreamReader
QCborStreamWriter
QCborValue
D
QDtls
QDtlsClientVerifier
E
ExtendedBuilder ( QKnxNetIpSearchResponseProxy )
ExtendedBuilder ( QKnxNetIpSearchRequestProxy )
G
GeneratorParameters ( QDtlsClientVerifier )
QGeoRouteLeg
I
Iterator ( QCborMap )
Iterator ( QCborArray )
K
QKnxCloudCover
QKnxCryptographicEngine
QKnxNetIpExtendedDeviceDibProxy
QKnxNetIpRouter
QKnxNetIpRoutingSystemBroadcastProxy
QKnxNetIpSecuredServiceFamiliesDibProxy
QKnxNetIpSecureWrapperProxy
QKnxNetIpSessionAuthenticateProxy
QKnxNetIpSessionRequestProxy
QKnxNetIpSessionResponseProxy
QKnxNetIpSessionStatusProxy
QKnxNetIpSrp
QKnxNetIpSrpProxy
QKnxNetIpTimerNotifyProxy
QKnxNetIpTunnelingFeatureGetProxy
QKnxNetIpTunnelingFeatureInfoProxy
QKnxNetIpTunnelingFeatureResponseProxy
QKnxNetIpTunnelingFeatureSetProxy
QKnxNetIpTunnelingInfoDibProxy
QKnxNetIpTunnelingSlotInfo
QKnxSecuredServiceInfo
M
MacAddress ( QKnxNetIpSrpProxy )
QMqttAuthenticationProperties
QMqttConnectionProperties
QMqttLastWillProperties
QMqttMessageStatusProperties
QMqttPublishProperties
QMqttServerConnectionProperties
QMqttStringPair
QMqttSubscriptionProperties
QMqttUnsubscriptionProperties
QMqttUserProperties
P
ProgrammingMode ( QKnxNetIpSrpProxy )
R
RequestDibs ( QKnxNetIpSrpProxy )
S
QScopeGuard
SupportedFamily ( QKnxNetIpSrpProxy )
W
QWaylandXdgDecorationManagerV1
QWaylandXdgPopup
QWaylandXdgShell
QWaylandXdgSurface
QWaylandXdgToplevel
QWebEngineUrlScheme

新成员函数

QBluetoothDeviceInfo :

QByteArray manufacturerData (quint16 manufacturerId ) const
QHash<quint16, QByteArray> manufacturerData () const
QVector<quint16> manufacturerIds () const
bool setManufacturerData (quint16 manufacturerId , const QByteArray & data )

QByteArray :

int compare (const char * c , Qt::CaseSensitivity cs ) const
int compare (const QByteArray & a , Qt::CaseSensitivity cs ) const
bool isLower () const
bool isUpper () const

QCryptographicHash :

int hashLength (QCryptographicHash::Algorithm method )

QExplicitlySharedDataPointer :

T * take ()

QMetaEnum :

const char * enumName () const

QMetaEnumBuilder :

QByteArray enumName () const
void setEnumName (const QByteArray & alias )

QRegularExpression :

QString anchoredPattern (const QString & 表达式 )
QString wildcardToRegularExpression (const QString & pattern )

QSortFilterProxyModel :

void setFilterRegularExpression (const QString & pattern )

QString :

int compare (QStringView s , Qt::CaseSensitivity cs ) const
bool isLower () const
bool isUpper () const

QStringList :

bool contains (QStringView str , Qt::CaseSensitivity cs ) const

QStringView :

int compare (QStringView str , Qt::CaseSensitivity cs ) const

QTextStream :

QTextStream & operator<< (QStringView string )

QTimer :

QMetaObject::Connection callOnTimeout (Functor slot , Qt::ConnectionType connectionType )
QMetaObject::Connection callOnTimeout (const QObject * context , Functor slot , Qt::ConnectionType connectionType )
QMetaObject::Connection callOnTimeout (const QObject * receiver , MemberFunction * slot , Qt::ConnectionType connectionType )

QWaitCondition :

bool wait (QMutex * lockedMutex , QDeadlineTimer deadline )
bool wait (QReadWriteLock * lockedReadWriteLock , QDeadlineTimer deadline )

QDBusMessage :

bool isInteractiveAuthorizationAllowed () const
void setInteractiveAuthorizationAllowed (bool enable )

QBitmap :

QBitmap fromImage (QImage && image , Qt::ImageConversionFlags flags )

QIcon :

QString fallbackThemeName ()
void setFallbackThemeName (const QString & name )

QImageReader :

QList<QByteArray> imageFormatsForMimeType (const QByteArray & mimeType )

QImageWriter :

QList<QByteArray> imageFormatsForMimeType (const QByteArray & mimeType )

QPainter :

void fillRect (int x , int y , int width , int height , QGradient::Preset preset )
void fillRect (const QRect & rectangle , QGradient::Preset preset )
void fillRect (const QRectF & rectangle , QGradient::Preset preset )

QPalette :

const QBrush & placeholderText () const

QStandardItem :

void clearData ()

QStandardItemModel :

bool clearItemData (const QModelIndex & index )

QTextBlockFormat :

int headingLevel () const
void setHeadingLevel (int level )

QTextImageFormat :

int quality () const
void setQuality (int quality )

QKnxAdditionalInfo :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxAddress :

quint8 mainOrAreaSection () const
quint8 middleOrLineSection () const
QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )
quint16 subOrDeviceSection (QKnxAddress::Notation notation ) const

QKnxByteArray :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxControlField :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxDatapointType :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxDeviceManagementFrame :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxExtendedControlField :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxGroupAddressInfo :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxGroupAddressInfos :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxLinkLayerFrame :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxNetIpConnectionHeader :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxNetIpCriProxy :

QKnxAddress individualAddress () const
bool isExtended () const

Builder :

Builder & setIndividualAddress (const QKnxAddress & address )

QKnxNetIpEndpointConnection :

void connectToHost (const QHostAddress & address , quint16 port , QKnxNetIp::HostProtocol protocol )

QKnxNetIpFrame :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxNetIpFrameHeader :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxNetIpRoutingIndicationProxy :

QKnxLinkLayerFrame cemi () const

Builder :

Builder & setCemi (const QKnxLinkLayerFrame & cemi )

QKnxNetIpSearchRequestProxy :

QKnxNetIpSearchRequestProxy::ExtendedBuilder extendedBuilder ()
QVector<QKnxNetIpSrp> extendedSearchParameters () const
bool isExtended () const

QKnxNetIpSearchResponseProxy :

QKnxNetIpSearchResponseProxy::ExtendedBuilder extendedBuilder ()
bool isExtended () const
QVector<QKnxNetIpDib> optionalDibs () const
QVector<QKnxNetIpDib> variableDibs () const

QKnxNetIpServerDiscoveryAgent :

QKnxNetIpServerDiscoveryAgent::DiscoveryModes discoveryMode () const
QVector<QKnxNetIpSrp> extendedSearchParameters () const
void setDiscoveryMode (QKnxNetIpServerDiscoveryAgent::DiscoveryModes mode )
void setExtendedSearchParameters (const QVector<QKnxNetIpSrp> & srps )

QKnxNetIpServerInfo :

QKnxNetIpDib extendedHardware () const
quint16 maskVersion () const
quint16 maximumLocalApduLength () const
QKnx::MediumStatus mediumStatus () const
QKnxNetIpDib tunnelingInfo () const
QVector<QKnxNetIpTunnelingSlotInfo> tunnelingSlotInfos () const

QKnxNetIpStructHeader :

typename std::enable_if<is_type<T, QKnxNetIp::SearchParameterType>::value, bool>::type isMandatory () const
QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )
typename std::enable_if<is_type<T, QKnxNetIp::SearchParameterType>::value, void>::type setMandatory (bool value )

QKnxNetIpStruct :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QKnxNetIpTunnel :

bool sendTunnelingFeatureGet (QKnx::InterfaceFeature feature )
bool sendTunnelingFeatureSet (QKnx::InterfaceFeature feature , const QKnxByteArray & value )
void tunnelingFeatureInfoReceived (QKnx::InterfaceFeature feature , QKnxByteArray value )
void tunnelingFeatureResponseReceived (QKnx::InterfaceFeature feature , QKnx::ReturnCode code , QKnxByteArray value )

QKnxTpdu :

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )

QGeoRoute :

QList<QGeoRouteLeg> routeLegs () const
void setRouteLegs (const QList<QGeoRouteLeg> & legs )

QGeoRouteSegment :

bool isLegLastSegment () const

QGeoServiceProviderFactoryV3 :

virtual void setQmlEngine (QQmlEngine * engine )

QMqttClient :

void authenticate (const QMqttAuthenticationProperties & prop )
void authenticationFinished (const QMqttAuthenticationProperties & p )
void authenticationRequested (const QMqttAuthenticationProperties & p )
QMqttConnectionProperties connectionProperties () const
QMqttLastWillProperties lastWillProperties () const
void messageStatusChanged (qint32 id , QMqtt::MessageStatus s , const QMqttMessageStatusProperties & properties )
qint32 publish (const QMqttTopicName & topic , const QMqttPublishProperties & properties , const QByteArray & message , quint8 qos , bool retain )
QMqttServerConnectionProperties serverConnectionProperties () const
void setConnectionProperties (const QMqttConnectionProperties & prop )
void setLastWillProperties (const QMqttLastWillProperties & prop )
QMqttSubscription * subscribe (const QMqttTopicFilter & topic , const QMqttSubscriptionProperties & properties , quint8 qos )
void unsubscribe (const QMqttTopicFilter & topic , const QMqttUnsubscriptionProperties & properties )

QMqttMessage :

QMqttPublishProperties publishProperties () const

QMqttSubscription :

QMqttUserProperties userProperties () const

QMqttTopicFilter :

QString sharedSubscriptionName () const

QSslCertificate :

QString issuerDisplayName () const
QString subjectDisplayName () const

QNearFieldManager :

void adapterStateChanged (QNearFieldManager::AdapterState state )
bool isSupported () const

QNearFieldTarget :

void reportError (QNearFieldTarget::Error error , const QNearFieldTarget::RequestId & id )

QGeoPath :

void clearPath ()

QGeoPolygon :

void addHole (const QVariant & holePath )
void addHole (const QList<QGeoCoordinate> & holePath )
const QVariantList hole (int index ) const
const QList<QGeoCoordinate> holePath (int index ) const
int holesCount () const
void removeHole (int index )

QJSEngine :

QJSValue importModule (const QString & fileName )
QJSValue newErrorObject (QJSValue::ErrorType errorType , const QString & message )

QJSValue :

QJSValue::ErrorType errorType () const

QQmlComponent :

QQmlEngine * engine () const

QQmlEngine :

int qmlTypeId (const char * uri , int versionMajor , int versionMinor , const char * qmlName )
T singletonInstance (int qmlTypeId )

QQuickStyle :

void addStylePath (const QString & path )
QStringList stylePathList ()

QRemoteObjectHostBase :

void addHostSideConnection (QIODevice * ioDevice )

QRemoteObjectNode :

void addClientSideConnection (QIODevice * ioDevice )
void registerExternalSchema (const QString & schema , QRemoteObjectNode::RemoteObjectSchemaHandler handler )

QCanBusDevice :

void clear (QCanBusDevice::Directions direction )
QVector<QCanBusFrame> readAllFrames ()

QWaylandCompositor :

void addSocketDescriptor (int fd )

QWaylandSeat :

void sendKeyEvent (int qtKey , bool pressed )

QWebSocket :

qint64 bytesToWrite () const

QWebSocketServer :

qintptr nativeDescriptor () const
bool setNativeDescriptor (qintptr socketDescriptor )

QDoubleSpinBox :

void setStepType (QAbstractSpinBox::StepType stepType )

QLayout :

int indexOf (QLayoutItem * layoutItem ) const

QLineEdit :

void inputRejected ()

QSpinBox :

void setStepType (QAbstractSpinBox::StepType stepType )

名称空间中的新函数

QByteArray deriveKeyPbkdf1 (QCryptographicHash::Algorithm algorithm , const QByteArray & data , const QByteArray & salt , int iterations , quint64 dkLen )
QByteArray deriveKeyPbkdf2 (QCryptographicHash::Algorithm algorithm , const QByteArray & data , const QByteArray & salt , int iterations , quint64 dkLen )
bool isInterfaceFeature (QKnx::InterfaceFeature feature )
bool isStructType (QKnx::NetIp::SearchParameterType type )
char * toString (const QCborError & c )
char * toString (const std::tuple<Types...> & tuple )

新全局函数

QDebug operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp )
void qFromBigEndian (const void * src , qsizetype count , void * dest )
void qFromLittleEndian (const void * src , qsizetype count , void * dest )
void qToBigEndian (const void * src , qsizetype count , void * dest )
void qToBigEndian (const void * src , qsizetype count , void * dest )
void qToLittleEndian (const void * src , qsizetype count , void * dest )
void qToLittleEndian (const void * src , qsizetype count , void * dest )
int qmlTypeId (const char * uri , int versionMajor , int versionMinor , const char * qmlName )

新宏

QT_TRANSLATE_N_NOOP ( context , sourceText )
QT_TRANSLATE_N_NOOP ( context , sourceText )
QT_TRANSLATE_N_NOOP3 ( context , sourceText , comment )
QT_TRANSLATE_N_NOOP3 ( context , sourceText , comment )
QT_TR_N_NOOP ( sourceText )
QT_TR_N_NOOP ( sourceText )

新枚举类型

enum class SearchParameterType { Unknown, Invalid, SelectByProgrammingMode, SelectByMACAddress, SelectByService, …, Reserved03 }
enum class SecureSessionStatus { AuthenticationSuccess, AuthenticationFailed, Unauthenticated, Timeout, KeepAlive, …, Unknown }
enum class Field { None, RSSI, ManufacturerData, All }
enum Direction { Input, Output, AllDirections }
enum HandshakeState { HandshakeNotStarted, HandshakeInProgress, PeerVerificationFailed, HandshakeComplete }
enum class QDtlsError { NoError, InvalidInputParameters, InvalidOperation, UnderlyingSocketError, RemoteClosedConnectionError, …, TlsNonFatalError }
enum class QDtlsError { NoError, InvalidInputParameters, InvalidOperation, UnderlyingSocketError, RemoteClosedConnectionError, …, TlsNonFatalError }
enum Preset { WarmFlame, NightFade, SpringWarmth, JuicyPeach, YoungPassion, …, NumPresets }
enum ErrorType { NoError, GenericError, EvalError, RangeError, ReferenceError, …, URIError }
enum class EmiType { Unknown, EMI1, EMI2, cEMI }
enum class InterfaceFeature { Unknown, SupportedEmiType, HostDeviceDescriptorType0, BusConnectionStatus, KnxManufacturerCode, …, InterfaceFeatureInfoServiceEnable }
enum class MediumStatus { Unknown, CommunicationPossible, CommunicationImpossible }
enum class ReturnCode { Success, SuccessWithCrc, MemoryError, CommandInvalid, CommandImpossible, …, Error }
enum DiscoveryMode { CoreV1, CoreV2 }
enum class MessageStatus { Unknown, Published, Acknowledged, Received, Released, Completed }
enum class PayloadFormatIndicator { Unspecified, UTF8Encoded }
enum class ReasonCode { Success, SubscriptionQoSLevel0, SubscriptionQoSLevel1, SubscriptionQoSLevel2, NoMatchingSubscriber, …, WildCardSubscriptionsNotSupported }
enum class AdapterState { Offline, TurningOn, Online, TurningOff }

新类型别名

typedef RemoteObjectSchemaHandler

新特性

新 QML 类型

T
TableView
W
WavefrontMesh
X
XdgDecorationManagerV1
XdgPopup
XdgShell
XdgSurface
XdgToplevel

新 QML 特性

defaultLogLevel
orientation
sortCaseSensitive
synchronousDrag
visibleArea

新 QML 信号

finished ()
finished ()

新 QML 方法

action ()
addSocketDescriptor ()
coordToMercator ()
等于 ()
mercatorToCoord ()
polygon ()
sendKeyEvent ()

其它 Qt 5 发行的补充