Qt 6.4 中新类和函数

此页面包含 Qt 6.4 中引入的所有新类和函数的完整列表。

新类

新成员函数

QAbstractItemModelTester

(自 6.4) voidsetUseFetchMore(bool value)

QByteArray

(自 6.4) QByteArraypercentDecoded(char percent) const
(自 6.4) voidresize(qsizetype newSize, char c)

QColor

(自 6.4) QColorfromString(QAnyStringView name)
(自 6.4) boolisValidColorName(QAnyStringView name)

QColorTransform

(自 6.4) boolisIdentity() const
(自 6.4) QRgbaFloat16map(QRgbaFloat16 rgbafp16) const
(自 6.4) QRgbaFloat32map(QRgbaFloat32 rgbafp32) const
(自 6.4) booloperator!=(const QColorTransform &ct1, const QColorTransform &ct2)
(自 6.4) booloperator==(const QColorTransform &ct1, const QColorTransform &ct2)

QDate

(自 6.4) QDateaddDuration(std::chrono::days ndays) const
(自 6.4) QDatefromStdSysDays(const std::chrono::sys_days &days)

QDateTime

(自 6.4) QDateTimeaddDuration(std::chrono::milliseconds msecs) const
(自 6.4) QDateTimefromStdLocalTime(const std::chrono::local_time<std::chrono::milliseconds> &time)
(自 6.4) QDateTimefromStdTimePoint(const std::chrono::time_point<Clock, Duration> &time)
(自 6.4) QDateTimefromStdTimePoint(std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds> time)
(自 6.4) QDateTimefromStdTimePoint(const std::chrono::local_time<std::chrono::milliseconds> &time)
(自 6.4) QDateTimefromStdZonedTime(const int &time)
(自 6.4) QDateTimeoperator+(const QDateTime &dateTime, std::chrono::milliseconds duration)
(自 6.4) QDateTimeoperator+(std::chrono::milliseconds duration, const QDateTime &dateTime)
(since 6.4) QDateTime &operator+=(std::chrono::milliseconds duration)
(since 6.4) std::chrono::millisecondsoperator-(const QDateTime &lhs, const QDateTime &rhs)
(自 6.4) QDateTimeoperator-(const QDateTime &dateTime, std::chrono::milliseconds duration)
(since 6.4) QDateTime &operator-=(std::chrono::milliseconds duration)
(since 6.4) std::chrono::sys_time<std::chrono::milliseconds>toStdSysMilliseconds() const
(since 6.4) std::chrono::sys_secondstoStdSysSeconds() const

QFileInfo

(自 6.4) boolisAlias() const

QFormLayout

(自 6.4) boolisRowVisible(int row) const
(自 6.4) boolisRowVisible(QWidget *widget) const
(自 6.4) boolisRowVisible(QLayout *layout) const
(自 6.4) voidsetRowVisible(int row, bool on)
(自 6.4) voidsetRowVisible(QWidget *widget, bool on)
(自 6.4) voidsetRowVisible(QLayout *layout, bool on)

QFuture

(since 6.4) QFuture<U>unwrap()

QHash

(since 6.4) autoasKeyValueRange() &
(since 6.4) autoasKeyValueRange() const&
(since 6.4) autoasKeyValueRange() &&
(since 6.4) autoasKeyValueRange() const&&

QImage

(since 6.4) QImagecolorTransformed(const QColorTransform &transform) const&
(since 6.4) QImagecolorTransformed(const QColorTransform &transform) &&

QJniEnvironment

(since 6.4) jfieldIDfindField(jclass clazz, const char *fieldName)
(since 6.4) jmethodIDfindMethod(jclass clazz, const char *methodName)
(since 6.4) jfieldIDfindStaticField(jclass clazz, const char *fieldName)
(since 6.4) jmethodIDfindStaticMethod(jclass clazz, const char *methodName)

QJniObject

(since 6.4) autocallMethod(const char *methodName, const char *signature, Args &&... args) const
(since 6.4) autocallMethod(const char *methodName, Args &&... args) const
(since 6.4) QJniObjectcallObjectMethod(const char *methodName, Args &&... args) const
(since 6.4) autocallStaticMethod(const char *className, const char *methodName, const char *signature, Args &&... args)
(since 6.4) autocallStaticMethod(jclass clazz, jmethodID methodId, Args &&... args)
(since 6.4) autocallStaticMethod(const char *className, const char *methodName, Args &&... args)
(since 6.4) autocallStaticMethod(jclass clazz, const char *methodName, Args &&... args)
(since 6.4) QJniObjectcallStaticObjectMethod(const char *className, const char *methodName, Args &&... args)
(since 6.4) QJniObjectcallStaticObjectMethod(jclass clazz, const char *methodName, Args &&... args)
(since 6.4) QJniObjectconstruct(Args &&... args)

QLatin1StringView

(自 6.4 版起) const char *constBegin() const
(自 6.4 版起) const char *constData() const
(自 6.4 版起) const char *constEnd() const
(自 6.4 版起) qsizetypecount(QStringView str, Qt::CaseSensitivity cs) const
(自 6.4 版起) qsizetypecount(QLatin1StringView l1, Qt::CaseSensitivity cs) const
(自 6.4 版起) qsizetypecount(QChar ch, Qt::CaseSensitivity cs) const
(自 6.4) boolempty() const
(自 6.4 版起) QLatin1Charfirst() const
(自 6.4 版起) QLatin1Charlast() const
(自 6.4 版起) qsizetypelength() const
(自 6.4 版起) doubletoDouble(bool *ok) const
(自 6.4 版起) floattoFloat(bool *ok) const
(自 6.4 版起) inttoInt(bool *ok, int base) const
(自 6.4 版起) longtoLong(bool *ok, int base) const
(自 6.4 版起) qlonglongtoLongLong(bool *ok, int base) const
(自 6.4 版起) shorttoShort(bool *ok, int base) const
(自 6.4 版起) uinttoUInt(bool *ok, int base) const
(自 6.4 版起) ulongtoULong(bool *ok, int base) const
(自 6.4 版起) qulonglongtoULongLong(bool *ok, int base) const
(自 6.4 版起) ushorttoUShort(bool *ok, int base) const

QLine

(自 6.4 版起) QLineFtoLineF() const

QListWidgetItem

(自 6.4) voidsetTextAlignment(Qt::Alignment alignment)

QMap

(since 6.4) autoasKeyValueRange() &
(since 6.4) autoasKeyValueRange() const &
(since 6.4) autoasKeyValueRange() &&
(since 6.4) autoasKeyValueRange() const &&

QMargins

(自 6.4 版起) QMarginsFtoMarginsF() const

QMqttSubscriptionProperties

(自 6.4) boolnoLocal() const
(自 6.4) voidsetNoLocal(bool noloc)

QMultiHash

(since 6.4) autoasKeyValueRange() &
(since 6.4) autoasKeyValueRange() const &
(since 6.4) autoasKeyValueRange() &&
(since 6.4) autoasKeyValueRange() const &&

QMultiMap

(since 6.4) autoasKeyValueRange() &
(since 6.4) autoasKeyValueRange() const &
(since 6.4) autoasKeyValueRange() &&
(since 6.4) autoasKeyValueRange() const &&

QMutexLocker

(自 6.4) boolisLocked() const
(自6.4开始) QMutexLocker<Mutex> &operator=(QMutexLocker<Mutex> &&other)
(自 6.4) voidswap(QMutexLocker<Mutex> &other)

QNetworkInformation

(自 6.4) boolloadBackendByFeatures(QNetworkInformation::Features features)
(自 6.4) boolloadBackendByName(QStringView backend)

QObject

(自 6.4) boolisQuickItemType() const
(自 6.4) voidsetObjectName(QAnyStringView name)

QPoint

(自6.4开始) QPointFtoPointF() const

QPolygon

(自6.4开始) QPolygonFtoPolygonF() const

QQmlApplicationEngine

(自 6.4) voidobjectCreationFailed(const QUrl &url)

QQuickRenderTarget

(自6.4开始) QQuickRenderTargetfromD3D11Texture(void *texture, uint format, const QSize &pixelSize, int sampleCount)
(自6.4开始) QQuickRenderTargetfromMetalTexture(MTLTexture *texture, uint format, const QSize &pixelSize, int sampleCount)
(自6.4开始) QQuickRenderTargetfromOpenGLTexture(uint textureId, uint format, const QSize &pixelSize, int sampleCount)
(自6.4开始) QQuickRenderTargetfromPaintDevice(QPaintDevice *device)
(自6.4开始) QQuickRenderTargetfromVulkanImage(VkImage image, VkImageLayout layout, VkFormat format, const QSize &pixelSize, int sampleCount)
(自 6.4) boolmirrorVertically() const
(自 6.4) voidsetMirrorVertically(bool enable)

QRect

(自6.4开始) QRectFtoRectF() const

QSGMaterialShader

(自 6.4 版起) intcombinedImageSamplerCount(int binding) const

QSize

(自6.4开始) QSizeFtoSizeF() const

QStringView

(自 6.4 版起) qsizetypecount(QLatin1StringView l1, Qt::CaseSensitivity cs) const
(自 6.4 版起) intlocaleAwareCompare(QStringView other) const

QTableWidgetItem

(自 6.4) voidsetTextAlignment(Qt::Alignment alignment)

QTcpServer

(自 6.4) voidpendingConnectionAvailable()

QTemporaryDir

(自6.4开始) QTemporaryDir &operator=(QTemporaryDir &&other)
(自 6.4) voidswap(QTemporaryDir &other)

QTextCursor

(自 6.4) voidinsertMarkdown(const QString &markdown, QTextDocument::MarkdownFeatures features)

QTextDocumentFragment

(自 6.4) QTextDocumentFragmentfromMarkdown(const QString &markdown, QTextDocument::MarkdownFeatures features)
(自 6.4) QStringtoMarkdown(QTextDocument::MarkdownFeatures features) const
(自 6.4) QStringtoRawText() const

QTextStream

(自 6.4) QTextStream &operator>>(char16_t &c)

QTextToSpeech

(自 6.4) boolsetEngine(const QString &engine, const QVariantMap &params)

QTimeZone

(自 6.4) QTimeZonefromStdTimeZonePtr(const int *timeZone)

QTreeWidgetItem

(自 6.4) voidsetTextAlignment(int column, Qt::Alignment alignment)

QUrlQuery

(自 6.4) size_tqHash(QMetaType type, size_t seed)

QVarLengthArray

(自 6.4) voidresize(qsizetype size, const T &v)

QVersionNumber

(自 6.4) QVersionNumberfromString(QAnyStringView string, qsizetype *suffixIndex)

QVoice

(自 6.4) QDataStream &operator<<(QDataStream &stream, const QVoice &voice)
(自 6.4) QDebugoperator<<(QDebug debug, const QVoice &voice)
(自 6.4) QDataStream &operator>>(QDataStream &stream, QVoice &voice)
(自 6.4) voidswap(QVoice &other)

QWebEnginePage

(自 6.4) voidfileSystemAccessRequested(QWebEngineFileSystemAccessRequest request)

QWebSocket

(自 6.4) QWebSocketHandshakeOptionshandshakeOptions() const
(自 6.4) voidopen(const QUrl &url, const QWebSocketHandshakeOptions &options)
(自 6.4) voidopen(const QNetworkRequest &request, const QWebSocketHandshakeOptions &options)
(自 6.4) QStringsubprotocol() const

QWebSocketServer

(自 6.4) voidsetSupportedSubprotocols(const QStringList &protocols)
(自 6.4) QStringListsupportedSubprotocols() const

命名空间中的新函数

(自 6.4) QLatin1StringViewoperator""_L1(const char *str, size_t size)
(自 6.4 版起) QLatin1Charoperator""_L1(char ch)
(自 6.4) QByteArrayoperator""_ba(const char *str, size_t size)
(自 6.4) QStringoperator""_s(const char16_t *str, size_t size)
(自 6.4) boolqIsPolishScheduled(const QQuickWindow *窗口)
(自 6.4) boolqWaitForPolish(const QQuickWindow *窗口, int 超时)
(自 6.4) boolqWaitForPolish(const QQuickItem *项目, int 超时)

新宏

(自6.4版起) QCOMPARE_EQ(计算值, 基线值)
(自6.4版起) QCOMPARE_GE(计算值, 基线值)
(自6.4版起) QCOMPARE_GT(计算值, 基线值)
(自6.4版起) QCOMPARE_LE(计算值, 基线值)
(自6.4版起) QCOMPARE_LT(计算值, 基线值)
(自6.4版起) QCOMPARE_NE(计算值, 基线值)
(自6.4版起) QTRY_COMPARE_EQ(计算值, 基线值)
(自6.4版起) QTRY_COMPARE_EQ_WITH_TIMEOUT(计算值, 基线值, 超时)
(自6.4版起) QTRY_COMPARE_GE(计算值, 基线值)
(自6.4版起) QTRY_COMPARE_GE_WITH_TIMEOUT(计算值, 基线值, 超时)
(自6.4版起) QTRY_COMPARE_GT(计算值, 基线值)
(自6.4版起) QTRY_COMPARE_GT_WITH_TIMEOUT(计算值, 基线值, 超时)
(自6.4版起) QTRY_COMPARE_LE(计算值, 基线值)
(自6.4版起) QTRY_COMPARE_LE_WITH_TIMEOUT(计算值, 基线值, 超时)
(自6.4版起) QTRY_COMPARE_LT(计算值, 基线值)
(自6.4版起) QTRY_COMPARE_LT_WITH_TIMEOUT(计算值, 基线值, 超时)
(自6.4版起) QTRY_COMPARE_NE(计算值, 基线值)
(自6.4版起) QTRY_COMPARE_NE_WITH_TIMEOUT(计算值, 基线值, 超时)
(自6.4版起) Q_CONSTINIT

新枚举类型

(自6.4版起) enumPolygonMode { Fill, Line }

新枚举值

新属性

新变量

(自6.4版起) polygonMode
(自6.4版起) MacOSVentura
(自6.4版起) Windows11_21H2
(自6.4版起) Windows11_22H2

新QML类型

新QML属性

QML类型 Model

(自6.4版起) castsReflections : bool

QML 类型 ReflectionProbe

(自6.4版起) debugView : bool

QML 类型 SceneEnvironment

(自6.4版起) skyBoxCubeMap : QtQuick3D::CubeMapTexture
(自6.4版起) skyboxBlurAmount : float
(自6.4版起) specularAAEnabled : bool

QML 类型 SpriteParticle3D

(自6.4版起) castsReflections : bool

QML 类型 TableView

(自6.4版起) animate : bool
(自6.4版起) keyNavigationEnabled : bool
(自6.4版起) pointerNavigationEnabled : bool
(自6.4版起) selectionBehavior : 枚举类型

QML 类型 View3D

(自6.4版起) renderFormat : 枚举类型

QML 类型 WaylandSurface

(自6.4版起) isOpaque : bool

QML 类型 WebSocket

(自6.4版起) negotiatedSubprotocol : QString
(自6.4版起) requestedSubprotocols : QStringList

QML 类型 WebSocketServer

(自6.4版起) supportedSubprotocols : QStringList

新增 QML 方法

QML 类型 TableView

(自 6.4 版本起) pointcellAtIndex(QModelIndex modelIndex)
(自 6.4 版起) intcolumnAtIndex(QModelIndex modelIndex)
(自 6.4 版本起) QModelIndexmodelIndex(point cell)
(自 6.4 版起) introwAtIndex(QModelIndex modelIndex)

QML 类型 TreeView

(自6.4版起) collapseRecursively(row)
(自6.4版起) expandRecursively(row, depth)
(自6.4版起) expandToIndex(QModelIndex index)

© 2024 Qt 公司。此处包含的文档贡献为各自所有者的版权。提供的文档受 GNU 自由文档许可协议版本 1.3 的条款许可,由自由软件基金会发布。Qt 及相关标志是芬兰和/或其他国家的 Qt 公司的商标。所有其他商标均为各自所有者的财产。