Qt 6.4 中的新类和函数

This page contains a comprehensive list of all new classes and functions introduced in Qt 6.4.

新类

A
QAbstractHttpServer
H
QHttpServer
QHttpServerRequest
QHttpServerResponder
QHttpServerResponse
QHttpServerRouter
QHttpServerRouterRule
P
QPdfLink
QPdfPageNavigator
S
QSslServer
W
QWebEngineFileSystemAccessRequest
QWebSocketHandshakeOptions

新成员函数

QAbstractItemModelTester :

void setUseFetchMore (bool value )

QByteArray :

QByteArray percentDecoded (char percent ) const
void resize (qsizetype newSize , char c )

QColor :

QColor fromString (QAnyStringView name )
bool isValidColorName (QAnyStringView name )

QColorTransform :

bool isIdentity () const
QRgbaFloat16 map (QRgbaFloat16 rgbafp16 ) const
QRgbaFloat32 map (QRgbaFloat32 rgbafp32 ) const
bool operator!= (const QColorTransform & ct1 , const QColorTransform & ct2 )
bool operator== (const QColorTransform & ct1 , const QColorTransform & ct2 )

QDate :

QDate addDuration (std::chrono::days ndays ) const
QDate fromStdSysDays (const std::chrono::sys_days & days )

QDateTime :

QDateTime addDuration (std::chrono::milliseconds msecs ) const
QDateTime fromStdLocalTime (const std::chrono::local_time<std::chrono::milliseconds> & time )
QDateTime fromStdTimePoint (const std::chrono::time_point<Clock, Duration> & time )
QDateTime fromStdTimePoint (const std::chrono::local_time<std::chrono::milliseconds> & time )
QDateTime fromStdZonedTime (const int & time )
QDateTime operator+ (const QDateTime & dateTime , std::chrono::milliseconds duration )
QDateTime operator+ (std::chrono::milliseconds duration , const QDateTime & dateTime )
QDateTime & operator+= (std::chrono::milliseconds duration )
std::chrono::milliseconds operator- (const QDateTime & lhs , const QDateTime & rhs )
QDateTime operator- (const QDateTime & dateTime , std::chrono::milliseconds duration )
QDateTime & operator-= (std::chrono::milliseconds duration )
std::chrono::sys_time<std::chrono::milliseconds> toStdSysMilliseconds () const
std::chrono::sys_seconds toStdSysSeconds () const

QFileInfo :

bool isAlias () const

QFormLayout :

bool isRowVisible (int row ) const
bool isRowVisible (QWidget * widget ) const
bool isRowVisible (QLayout * layout ) const
void setRowVisible (int row , bool on )
void setRowVisible (QWidget * widget , bool on )
void setRowVisible (QLayout * layout , bool on )

QFuture :

QFuture<U> unwrap ()

QHash :

auto asKeyValueRange () &
auto asKeyValueRange () const &
auto asKeyValueRange () &&
auto asKeyValueRange () const &&

QImage :

QImage colorTransformed (const QColorTransform & transform ) const &
QImage colorTransformed (const QColorTransform & transform ) &&

QJniEnvironment :

jfieldID findField (jclass clazz , const char * fieldName )
jmethodID findMethod (jclass clazz , const char * methodName )
jfieldID findStaticField (jclass clazz , const char * fieldName )
jmethodID findStaticMethod (jclass clazz , const char * methodName )

QJniObject :

auto callMethod (const char * methodName , const char * signature , Args &&... args ) const
auto callMethod (const char * methodName , Args &&... args ) const
QJniObject callObjectMethod (const char * methodName , Args &&... args ) const
auto callStaticMethod (const char * className , const char * methodName , const char * signature , Args &&... args )
auto callStaticMethod (jclass clazz , jmethodID methodId , Args &&... args )
auto callStaticMethod (const char * className , const char * methodName , Args &&... args )
auto callStaticMethod (jclass clazz , const char * methodName , Args &&... args )
QJniObject callStaticObjectMethod (const char * className , const char * methodName , Args &&... args )
QJniObject callStaticObjectMethod (jclass clazz , const char * methodName , Args &&... args )
QJniObject construct (Args &&... args )

QLatin1Char :

QLatin1Char operator""_L1 (char ch )

QLatin1StringView :

const char * constBegin () const
const char * constData () const
const char * constEnd () const
qsizetype count (QStringView str , Qt::CaseSensitivity cs ) const
qsizetype count (QLatin1StringView l1 , Qt::CaseSensitivity cs ) const
qsizetype count (QChar ch , Qt::CaseSensitivity cs ) const
bool empty () const
QLatin1Char first () const
QLatin1Char last () const
qsizetype length () const
QLatin1StringView operator""_L1 (const char * str , size_t size )
double toDouble (bool * ok ) const
float toFloat (bool * ok ) const
int toInt (bool * ok , int base ) const
long toLong (bool * ok , int base ) const
qlonglong toLongLong (bool * ok , int base ) const
short toShort (bool * ok , int base ) const
uint toUInt (bool * ok , int base ) const
ulong toULong (bool * ok , int base ) const
qulonglong toULongLong (bool * ok , int base ) const
ushort toUShort (bool * ok , int base ) const

QLine :

QLineF toLineF () const

QListWidgetItem :

void setTextAlignment (Qt::Alignment alignment )

QMap :

auto asKeyValueRange () &
auto asKeyValueRange () const &
auto asKeyValueRange () &&
auto asKeyValueRange () const &&

QMargins :

QMarginsF toMarginsF () const

QMetaType :

size_t qHash (QMetaType type , size_t seed )

QMqttSubscriptionProperties :

bool noLocal () const
void setNoLocal (bool noloc )

QMultiHash :

auto asKeyValueRange () &
auto asKeyValueRange () const &
auto asKeyValueRange () &&
auto asKeyValueRange () const &&

QMultiMap :

auto asKeyValueRange () &
auto asKeyValueRange () const &
auto asKeyValueRange () &&
auto asKeyValueRange () const &&

QMutexLocker :

bool isLocked () const
QMutexLocker<Mutex> & operator= (QMutexLocker<Mutex> && other )
void swap (QMutexLocker<Mutex> & other )

QNetworkInformation :

bool loadBackendByFeatures (QNetworkInformation::Features features )
bool loadBackendByName (QStringView backend )

QObject :

bool isQuickItemType () const
void setObjectName (QAnyStringView name )

QPoint :

QPointF toPointF () const

QPolygon :

QPolygonF toPolygonF () const

QQmlApplicationEngine :

void objectCreationFailed (const QUrl & url )

QQuickRenderTarget :

QQuickRenderTarget fromD3D11Texture (void * texture , uint format , const QSize & pixelSize , int sampleCount )
QQuickRenderTarget fromMetalTexture (MTLTexture * texture , uint format , const QSize & pixelSize , int sampleCount )
QQuickRenderTarget fromOpenGLTexture (uint textureId , uint format , const QSize & pixelSize , int sampleCount )
QQuickRenderTarget fromPaintDevice (QPaintDevice * device )
QQuickRenderTarget fromVulkanImage (VkImage image , VkImageLayout layout , VkFormat format , const QSize & pixelSize , int sampleCount )
bool mirrorVertically () const
void setMirrorVertically (bool enable )

QRect :

QRectF toRectF () const

QSGMaterialShader :

int combinedImageSamplerCount (int binding ) const

QSize :

QSizeF toSizeF () const

QStringView :

qsizetype count (QLatin1StringView l1 , Qt::CaseSensitivity cs ) const
int localeAwareCompare (QStringView other ) const

QTableWidgetItem :

void setTextAlignment (Qt::Alignment alignment )

QTcpServer :

void pendingConnectionAvailable ()

QTemporaryDir :

QTemporaryDir & operator= (QTemporaryDir && other )
void swap (QTemporaryDir & other )

QTextCursor :

void insertMarkdown (const QString & markdown , QTextDocument::MarkdownFeatures features )

QTextDocumentFragment :

QTextDocumentFragment fromMarkdown (const QString & markdown , QTextDocument::MarkdownFeatures features )
QString toMarkdown (QTextDocument::MarkdownFeatures features ) const
QString toRawText () const

QTextStream :

QTextStream & operator>> (char16_t & c )

QTextToSpeech :

bool setEngine (const QString & engine , const QVariantMap & params )

QTimeZone :

QTimeZone fromStdTimeZonePtr (const int * timeZone )

QTreeWidgetItem :

void setTextAlignment (int column , Qt::Alignment alignment )

QVarLengthArray :

void resize (qsizetype size , const T & v )

QVersionNumber :

QVersionNumber fromString (QAnyStringView string , qsizetype * suffixIndex )

QVoice :

QDataStream & operator<< (QDataStream & stream , const QVoice & voice )
QDebug operator<< (QDebug debug , const QVoice & voice )
QDataStream & operator>> (QDataStream & stream , QVoice & voice )
void swap (QVoice & other )

QVulkanWindow :

void setEnabledFeaturesModifier (const QVulkanWindow::EnabledFeaturesModifier & modifier )

QWebSocket :

QWebSocketHandshakeOptions handshakeOptions () const
void open (const QUrl & url , const QWebSocketHandshakeOptions & options )
void open (const QNetworkRequest & request , const QWebSocketHandshakeOptions & options )
QString subprotocol () const

QWebSocketServer :

void setSupportedSubprotocols (const QStringList & protocols )
QStringList supportedSubprotocols () const

名称空间中的新函数

QByteArray operator""_ba (const char * str , size_t size )
QString operator""_s (const char16_t * str , size_t size )
bool qIsPolishScheduled (const QQuickWindow * window )
bool qWaitForPolish (const QQuickWindow * window , int timeout )
bool qWaitForPolish (const QQuickItem * item , int timeout )

新宏

QCOMPARE_EQ ( left , right )
QCOMPARE_GE ( left , right )
QCOMPARE_GT ( left , right )
QCOMPARE_LE ( left , right )
QCOMPARE_LT ( left , right )
QCOMPARE_NE ( left , right )
QTRY_COMPARE_EQ ( left , right )
QTRY_COMPARE_EQ_WITH_TIMEOUT ( left , right , timeout )
QTRY_COMPARE_GE ( left , right )
QTRY_COMPARE_GE_WITH_TIMEOUT ( left , right , timeout )
QTRY_COMPARE_GT ( left , right )
QTRY_COMPARE_GT_WITH_TIMEOUT ( left , right , timeout )
QTRY_COMPARE_LE ( left , right )
QTRY_COMPARE_LE_WITH_TIMEOUT ( left , right , timeout )
QTRY_COMPARE_LT ( left , right )
QTRY_COMPARE_LT_WITH_TIMEOUT ( left , right , timeout )
QTRY_COMPARE_NE ( left , right )
QTRY_COMPARE_NE_WITH_TIMEOUT ( left , right , timeout )
Q_CONSTINIT

新枚举类型

enum PolygonMode { Fill, Line }

新特性

新的变量

polygonMode
MacOSVentura
Windows11_21H2
Windows11_22H2

新 QML 类型

B
BakedLightmap
BoxShape
C
CapsuleShape
CharacterController
CollisionShape
ColorDialog
ConvexMeshShape
D
DynamicRigidBody
F
FrameAnimation
H
HeightFieldGeometry
HeightFieldShape
I
InstanceModel
InstanceRepeater
L
Lightmapper
LineParticle3D
LookAtNode
P
PdfBookmarkModel
PdfPageImage
PhysicsBody
PhysicsMaterial
PhysicsNode
PhysicsWorld
PlaneShape
R
Repeller3D
S
ScaleAffector3D
SphereShape
StaticRigidBody
SystemInformation
T
TriangleMeshShape
TriggerBody

新 QML 特性

QML 类型 Model :

castsReflections : bool

QML 类型 ReflectionProbe :

debugView : bool

QML 类型 SceneEnvironment :

skyBoxCubeMap : QtQuick3D::CubeMapTexture
skyboxBlurAmount : float
specularAAEnabled : bool

QML 类型 SpriteParticle3D :

castsReflections : bool

QML 类型 TableView :

animate : bool
keyNavigationEnabled : bool
pointerNavigationEnabled : bool
selectionBehavior : enumeration

QML 类型 View3D :

renderFormat : enumeration

QML 类型 WaylandSurface :

isOpaque : bool

QML 类型 WebSocket :

negotiatedSubprotocol : QString
requestedSubprotocols : QStringList

QML 类型 WebSocketServer :

supportedSubprotocols : QStringList

新 QML 方法

QML 类型 TableView :

point cellAtIndex (QModelIndex modelIndex )
int columnAtIndex (QModelIndex modelIndex )
QModelIndex modelIndex (point cell )
int rowAtIndex (QModelIndex modelIndex )

QML 类型 TreeView :

collapseRecursively ( row )
expandRecursively ( row , depth )
expandToIndex (QModelIndex index )

版权所有  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1