本页内容

QAccessibleTextInsertEvent Class

QAccessibleTextInsertEvent 类用于通知文本插入操作。更多内容...

头文件: #include <QAccessibleTextInsertEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
继承自: QAccessibleTextCursorEvent

公共函数

QAccessibleTextInsertEvent(QAccessibleInterface *iface, int position, const QString &text)
QAccessibleTextInsertEvent(QObject *object, int position, const QString &text)
int changePosition() const
QString textInserted() const

详细说明

该类与QAccessible::updateAccessibility() 配合使用。

成员函数文档

QAccessibleTextInsertEvent::QAccessibleTextInsertEvent(QAccessibleInterface *iface, int position, const QString &text)

为iface 创建一个新的QAccessibleTextInsertEvent事件。text 已插入到position 位置。

QAccessibleTextInsertEvent::QAccessibleTextInsertEvent(QObject *object, int position, const QString &text)

为object 创建一个新的QAccessibleTextInsertEvent事件。text 已插入到position 位置。默认情况下,假定光标已移动到选区末尾。如果并非如此,则需要通过QAccessibleTextCursorEvent::setCursorPosition()方法手动为该事件设置光标位置。

int QAccessibleTextInsertEvent::changePosition() const

返回文本被插入的位置。

QString QAccessibleTextInsertEvent::textInserted() const

返回已插入的文本。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.