QAccessibleTextSelectionEvent Class

QAccessibleTextSelectionEvent 是对象的文本选择发生变化的信号。更多

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

公共函数

QAccessibleTextSelectionEvent(QAccessibleInterface *iface, int start, int end)
QAccessibleTextSelectionEvent(QObject *object, int start, int end)
int selectionEnd() const
int selectionStart() const
void setSelection(int start, int end)

详细说明

该类与QAccessible::updateAccessibility() 一起使用。

成员函数文档

QAccessibleTextSelectionEvent::QAccessibleTextSelectionEvent(QAccessibleInterface *iface, int start, int end)

iface 构建一个新的 QAccessibleTextSelectionEvent。该事件通知的新选择是从startend 的位置。

QAccessibleTextSelectionEvent::QAccessibleTextSelectionEvent(QObject *object, int start, int end)

object 构建一个新的 QAccessibleTextSelectionEvent。该事件通知的新选择是从startend 的位置。

int QAccessibleTextSelectionEvent::selectionEnd() const

返回最后选定字符的位置。

int QAccessibleTextSelectionEvent::selectionStart() const

返回第一个选定字符的位置。

void QAccessibleTextSelectionEvent::setSelection(int start, int end)

将此事件的选择设置为startend

© 2025 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.