Qt 6.5 新增类和函数

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

新命名空间

(自 6.5) 命名空间QtCanBus
(自 6.5) 命名空间QtProtobuf

新类

新成员函数

QAbstractOAuth2

(自 6.5) voidsetSslConfiguration(const QSslConfiguration &configuration)
(自 6.5) QSslConfigurationsslConfiguration() const
(自 6.5) voidsslConfigurationChanged(const QSslConfiguration &configuration)

QAccessibleInterface

(自 6.5) QAccessibleSelectionInterface *selectionInterface()

QAnyStringView

(自 6.5) voidchop(qsizetype n)
(自 6.5) QAnyStringViewchopped(qsizetype n) const
(自 6.5) QAnyStringViewfirst(qsizetype n) const
(自 6.5) QAnyStringViewlast(qsizetype n) const
(自 6.5) QAnyStringViewsliced(qsizetype pos) const
(自 6.5) QAnyStringViewsliced(qsizetype pos, qsizetype n) const
(自 6.5) voidtruncate(qsizetype n)

QBasicTimer

(自 6.5) voidstart(std::chrono::milliseconds duration, QObject *object)
(自 6.5) voidstart(std::chrono::milliseconds duration, Qt::TimerType timerType, QObject *obj)

QByteArray

(since 6.5) QByteArray::iteratorerase(QByteArray::const_iterator it)
(since 6.5) QByteArrayfromEcmaUint8Array(emscripten::val uint8array)
(since 6.5) QByteArray &removeAt(qsizetype pos)
(since 6.5) QByteArray &removeFirst()
(since 6.5) QByteArray &removeLast()
(since 6.5) emscripten::valtoEcmaUint8Array()

QCoreApplication

(since 6.5) Qt::PermissionStatuscheckPermission(const QPermission &permission)
(自 6.5) voidrequestPermission(const QPermission &permission, Functor &&functor)
(自 6.5) voidrequestPermission(const QPermission &permission, const QObject *context, Functor functor)

QCryptographicHash

(since 6.5) QCryptographicHash::Algorithmalgorithm() const
(since 6.5) QCryptographicHash &operator=(QCryptographicHash &&other)
(since 6.5) boolsupportsAlgorithm(QCryptographicHash::Algorithm method)
(自 6.5) voidswap(QCryptographicHash &other)

QDate

(since 6.5) QDateTimeendOfDay() const
(since 6.5) QDateTimestartOfDay() const

QDateTime

(since 6.5) QDateTimecurrentDateTime(const QTimeZone &zone)
(since 6.5) QDateTimefromMSecsSinceEpoch(qint64 msecs)
(since 6.5) QDateTimefromSecsSinceEpoch(qint64 secs)
(since 6.5) QTimeZonetimeRepresentation() const

QDebug

(since 6.5) QDebug &operator<<(const std::basic_string<Char, Args...> &s)
(since 6.5) QDebug &operator<<(std::basic_string_view<Char, Args...> s)

QDomDocument

(since 6.5) QDomDocument::ParseResultsetContent(const QByteArray &data, QDomDocument::ParseOptions options)
(since 6.5) QDomDocument::ParseResultsetContent(QAnyStringView data, QDomDocument::ParseOptions options)
(since 6.5) QDomDocument::ParseResultsetContent(QIODevice *device, QDomDocument::ParseOptions options)
(since 6.5) QDomDocument::ParseResultsetContent(QXmlStreamReader *reader, QDomDocument::ParseOptions options)

QGlyphRun

(自 6.5) voidsetSourceString(const QString &sourceString)
(自 6.5) voidsetStringIndexes(const QList<qsizetype> &stringIndexes)
(since 6.5) QStringsourceString() const
(since 6.5) QList<qsizetype>stringIndexes() const

QGuiApplication

(自 6.5) voidsetBadgeNumber(qint64 number)

QHttp1Configuration

(since 6.5) booloperator!=(const QHttp1Configuration &lhs, const QHttp1Configuration &rhs)
(since 6.5) booloperator==(const QHttp1Configuration &lhs, const QHttp1Configuration &rhs)
(since 6.5) size_tqHash(const QHttp1Configuration &key, size_t seed)

QHttpServerRequest

(since 6.5) QHostAddresslocalAddress() const
(since 6.5) quint16localPort() const
(since 6.5) quint16remotePort() const

QHttpServerResponder

(自 6.5) voidsendResponse(const QHttpServerResponse &response)

QLatin1StringView

(since 6.5) intcompare(QUtf8StringView str, Qt::CaseSensitivity cs) const

QLibraryInfo

(since 6.5) boolisSharedBuild()

QLowEnergyController

(自 6.5) voidreadRssi()
(自 6.5) voidrssiRead(qint16 rssi)

QMessageLogger

(自 6.5) voidfatal(const QLoggingCategory &cat, const char *msg, ...) const
(自 6.5) voidfatal(QMessageLogger::CategoryFunction catFunc, const char *msg, ...) const
(since 6.5) QDebugfatal() const
(since 6.5) QDebugfatal(const QLoggingCategory &cat) const
(since 6.5) QDebugfatal(QMessageLogger::CategoryFunction catFunc) const

QMetaMethod

(since 6.5) boolinvoke(QObject *obj, Qt::ConnectionType type, QTemplatedMetaMethodReturnArgument<ReturnArg> ret, Args &&... arguments) const
(since 6.5) boolinvoke(QObject *obj, Qt::ConnectionType type, Args &&... arguments) const
(since 6.5) boolinvoke(QObject *obj, QTemplatedMetaMethodReturnArgument<ReturnArg> ret, Args &&... arguments) const
(since 6.5) boolinvoke(QObject *obj, Args &&... arguments) const
(since 6.5) boolinvokeOnGadget(void *gadget, QTemplatedMetaMethodReturnArgument<ReturnArg> ret, Args &&... arguments) const
(since 6.5) boolinvokeOnGadget(void *gadget, Args &&... arguments) const

QMetaObject

(since 6.5) boolinvokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QTemplatedMetaMethodReturnArgument<ReturnArg> ret, Args &&... args)
(since 6.5) boolinvokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, Args &&... args)
(since 6.5) boolinvokeMethod(QObject *obj, const char *member, QTemplatedMetaMethodReturnArgument<ReturnArg> ret, Args &&... args)
(since 6.5) boolinvokeMethod(QObject *obj, const char *member, Args &&... args)
(since 6.5) QObject *newInstance(Args &&... arguments) const

QMetaType

(since 6.5) boolisCopyConstructible() const
(since 6.5) boolisDefaultConstructible() const
(since 6.5) boolisDestructible() const
(since 6.5) boolisMoveConstructible() const
(since 6.5) QDebugoperator<<(QDebug d, QMetaType m)
(since 6.5) intqRegisterMetaType(QMetaType meta)
(自 6.5) voidregisterType() const

QEGLContext

(since 6.5) virtual voidinvalidateContext() = 0

QNetworkRequest

(since 6.5) QHttp1Configurationhttp1Configuration() const
(自 6.5) voidsetHttp1Configuration(const QHttp1Configuration &configuration)

QOpenGLBuffer

(since 6.5) QOpenGLBuffer &operator=(QOpenGLBuffer &&other)
(自 6.5) voidswap(QOpenGLBuffer &other)

QOpenGLWidget

(since 6.5) QOpenGLWidget::TargetBuffercurrentTargetBuffer() const
(since 6.5) GLuintdefaultFramebufferObject(QOpenGLWidget::TargetBuffer targetBuffer) const
(since 6.5) QImagegrabFramebuffer(QOpenGLWidget::TargetBuffer targetBuffer)
(自 6.5) voidmakeCurrent(QOpenGLWidget::TargetBuffer targetBuffer)

QQmlApplicationEngine

(自 6.5) voidloadFromModule(QAnyStringView uri, QAnyStringView typeName)

QQmlComponent

(since 6.5) boolisBound() const
(自 6.5) voidloadFromModule(QAnyStringView uri, QAnyStringView typeName, QQmlComponent::CompilationMode mode)

QQmlEngine

(自 6.5) voidofflineStoragePathChanged()
(since 6.5) TsingletonInstance(QAnyStringView uri, QAnyStringView typeName)

QQuickGraphicsConfiguration

(since 6.5) boolisAutomaticPipelineCacheEnabled() const
(自 6.5) voidsetAutomaticPipelineCache(bool enable)
(自 6.5) voidsetDebugLayer(bool enable)
(自 6.5) voidsetDebugMarkers(bool enable)
(自 6.5) voidsetPipelineCacheLoadFile(const QString &filename)
(自 6.5) voidsetPipelineCacheSaveFile(const QString &filename)
(自 6.5) voidsetPreferSoftwareDevice(bool enable)

QRectF

(since 6.5) QRectFfromDOMRect(emscripten::val domRect)
(since 6.5) emscripten::valtoDOMRect() const

QRegularExpression

(since 6.5) QRegularExpressionMatchIteratorglobalMatchView(QStringView subjectView, qsizetype offset, QRegularExpression::MatchType matchType, QRegularExpression::MatchOptions matchOptions) const
(since 6.5) QRegularExpressionMatchmatchView(QStringView subjectView, qsizetype offset, QRegularExpression::MatchType matchType, QRegularExpression::MatchOptions matchOptions) const

QSGRenderNode

(自6.5版本起) const QMatrix4x4 *projectionMatrix() const

QString

(自6.5版本起) QString &append(QUtf8StringView str)
(自6.5版本起) QString::iteratorerase(QString::const_iterator it)
(自6.5版本起) QString &insert(qsizetype position, QUtf8StringView str)
(自6.5版本起) QString &operator+=(QUtf8StringView str)
(自6.5版本起) QString &prepend(QUtf8StringView str)
(自6.5版本起) QString &removeAt(qsizetype pos)
(自6.5版本起) QString &removeFirst()
(自6.5版本起) QString &removeLast()

QStringView

(since 6.5) intcompare(QUtf8StringView str, Qt::CaseSensitivity cs) const

QSvgGenerator

(自6.5版本起) QSvgGenerator::SvgVersionsvgVersion() const

QTextLayout

(自6.5版本起) QListglyphRuns(int from, int length, QTextLayout::GlyphRunRetrievalFlags retrievalFlags) const

QTextLine

(自6.5版本起) QListglyphRuns(int from, int length, QTextLayout::GlyphRunRetrievalFlags retrievalFlags) const

QTimeZone

(since 6.5) QTimeZoneasBackendZone() const
(since 6.5) intfixedSecondsAheadOfUtc() const
(since 6.5) QTimeZonefromDurationAheadOfUtc(std::chrono::seconds offset)
(since 6.5) QTimeZonefromSecondsAheadOfUtc(int offset)
(since 6.5) boolisUtcOrFixedOffset(Qt::TimeSpec spec)
(since 6.5) boolisUtcOrFixedOffset() const
(自6.5版本起) Qt::TimeSpectimeSpec() const

QTransform

(自6.5版本起) QTransform &rotate(qreal a, Qt::Axis axis, qreal distanceToPlane)
(自6.5版本起) QTransform &rotateRadians(qreal a, Qt::Axis axis, qreal distanceToPlane)

QUtf8StringView

(since 6.5) intcompare(QUtf8StringView str, Qt::CaseSensitivity cs) const
(since 6.5) intcompare(QStringView str, Qt::CaseSensitivity cs) const
(since 6.5) intcompare(QLatin1StringView str, Qt::CaseSensitivity cs) const

QVulkanInstance

(自 6.5) voidclearDebugOutputFilters()
(自 6.5) voidinstallDebugOutputFilter(QVulkanInstance::DebugUtilsFilter filter)

QWebEngineProfile

(since 6.5) boolisPushServiceEnabled() const
(自 6.5) voidsetPushServiceEnabled(bool enable)

QWebEngineUrlRequestInfo

(自6.5版本起) QHashhttpHeaders() const

QWebSocket

(自 6.5) voiderrorOccurred(QAbstractSocket::SocketError error)

命名空间中的新功能

(since 6.5) boolcurrentTestResolved()
(自 6.5) voidqRegisterTestCase(const QString &name, QTest::TestEntryFunction entryFunction)
(since 6.5) char *toString(const QKeySequence &ks)

新宏 definitions

(since 6.5) QML_CONSTRUCTIBLE_VALUE
(since 6.5) QML_STRUCTURED_VALUE
(since 6.5) Q_DECLARE_EXPORTED_LOGGING_CATEGORY(name, EXPORT_MACRO)
(since 6.5) Q_PROCESSOR_LOONGARCH
(since 6.5) Q_PROCESSOR_LOONGARCH_32
(since 6.5) Q_PROCESSOR_LOONGARCH_64
(自 6.5) voidQ_UNREACHABLE_RETURN(...)
(since 6.5) qCFatal(category, const char *message, ...)
(since 6.5) qCFatal(category)

新枚举类型

(since 6.5) enum classParseOption { Default, UseNamespaceProcessing, PreserveSpacingOnlyNodes }
(since 6.5) enumTargetBuffer { LeftBuffer, RightBuffer }
(since 6.5) enum classSvgVersion { SvgTiny12, Svg11 }
(since 6.5) enumGlyphRunRetrievalFlag { RetrieveGlyphIndexes, RetrieveGlyphPositions, RetrieveStringIndexes, RetrieveString, DefaultRetrievalFlags, RetrieveAll }
(since 6.5) enumInitialization { LocalTime, UTC }
(since 6.5) enumDebugMessageSeverityFlag { VerboseSeverity, InfoSeverity, WarningSeverity, ErrorSeverity }
(since 6.5) enumDebugMessageTypeFlag { GeneralMessage, ValidationMessage, PerformanceMessage }
(since 6.5) enum classPermissionStatus { Undetermined, Granted, Denied }

新枚举值

新类型别名

(since 6.5) DebugUtilsFilter

新属性

新变量

(since 6.5) dstAlpha
(since 6.5) separateBlendFactors
(since 6.5) srcAlpha
(since 6.5) Android12
(since 6.5) Android12L
(since 6.5) Android13
(since 6.5) Windows10_22H2

新 QML 类型

新 QML 属性

QML 类型 Camera

(since 6.5) levelOfDetailBias : float

QML 类型 CaptureSession

(since 6.5) screenCapture : ScreenCapture

QML 类型 DebugSettings

(since 6.5) materialOverride : 枚举
(since 6.5) wireframeEnabled : 布尔值

QML 类型 DynamicRigidBody

(since 6.5) kinematicEulerRotation : 四维向量
(since 6.5) kinematicPivot : 三维向量
(since 6.5) kinematicPosition : 三维向量
(since 6.5) kinematicRotation : 三维向量

QML 类型 Item

(since 6.5) layer.live : 布尔值

QML 类型 MapCircle

(since 6.5) referenceSurface : 枚举

QML 类型 MapPolygon

(since 6.5) referenceSurface : 枚举

QML 类型 MapPolyline

(since 6.5) referenceSurface : 枚举

QML 类型 MapRectangle

(since 6.5) referenceSurface : 枚举

QML 类型 MediaPlayer

(since 6.5) playing : 布尔值

QML 类型 Model

(since 6.5) levelOfDetailBias : 实数

QML 类型 PickResult

(since 6.5) instanceIndex : 整数

QML 类型 PrincipledMaterial

(since 6.5) vertexColorsEnabled : 布尔值

QML 类型 ReflectionProbe

(since 6.5) texture : 立方体贴图

QML 类型 RenderStats

(since 6.5) drawCallCount : 无符号长整型
(since 6.5) drawVertexCount : 无符号长整型
(since 6.5) effectGenerationTime : 有符号长整型
(since 6.5) extendedDataCollectionEnabled : 布尔值
(since 6.5) graphicsAPIName : 字符串
(since 6.5) imageDataSize : 无符号长整型
(since 6.5) materialGenerationTime : 有符号长整型
(since 6.5) meshDataSize : 无符号长整型
(since 6.5) pipelineCount : 整数
(since 6.5) pipelineCreationTime : 有符号长整型
(since 6.5) renderPassCount : 整数
(since 6.5) vmemAllocCount : 无符号长整型
(since 6.5) vmemUsedBytes : 无符号长整型

QML 类型 SceneEnvironment

(since 6.5) aoEnabled : 布尔值
(since 6.5) debugSettings : QtQuick3D::DebugSettings
(since 6.5) fog : QtQuick3D::Fog
(since 6.5) scissorRect : 矩形

QML 类型 SpecularGlossyMaterial

(since 6.5) vertexColorsEnabled : 布尔值

QML 类型 TableView

(since 6.5) editTriggers : 枚举类型
(since 6.5) resizableColumns : 布尔值
(since 6.5) resizableRows : 布尔值

QML 类型 TapHandler

(since 6.5) exclusiveSignals : 枚举类型

QML 类型 TreeViewDelegate

(since 6.5) editing : 布尔值

新 QML 信号

(since 6.5) frameDone(浮点数 timestep)
(since 6.5) layoutChanged()

新 QML 方法

QML 类型 Locale

(自 6.5 版起) 字符串toString(整数 i)
(自 6.5 版起) 字符串toString(浮点数 f, 字符 format, 整数 precision)
(自 6.5 版起) 字符串toString(日期 date, 字符串 format)
(自 6.5 版起) 字符串toString(日期 date, 格式类型 format)

QML 类型 TableView

(since 6.5) closeEditor()
(since 6.5) edit(QModelIndex modelIndex)
(自 6.5 版起) 项目itemAtIndex(QModelIndex index)
(since 6.5) positionViewAtIndex(QModelIndex index, 位置模式 mode, 点 offset, 矩形 subRect)

QML 类型 TestCase

(since 6.5) boolwaitForPolish(对象 windowOrItem, 整数 timeout)

© 2024 Qt 公司有限公司。此处包含的文档贡献者是各自版权的所有者。本处的文档是根据自由软件基金会发布的 GNU 自由文档许可证第 1.3 版的条款提供的。Qt 及相关标志是芬兰的 Qt 公司及其在全球的子公司和关联公司的商标。所有其他商标均为其各自所有者的财产。