New Classes and Functions in 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 Type Model :

castsReflections : bool

QML Type ReflectionProbe :

debugView : bool

QML Type SceneEnvironment :

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

QML Type SpriteParticle3D :

castsReflections : bool

QML Type TableView :

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

QML Type View3D :

renderFormat : enumeration

QML Type WaylandSurface :

isOpaque : bool

QML Type WebSocket :

negotiatedSubprotocol : QString
requestedSubprotocols : QStringList

QML Type WebSocketServer :

supportedSubprotocols : QStringList

新 QML 方法

QML Type TableView :

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

QML Type TreeView :

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