QInputMethodQueryEvent Class

QInputMethodQueryEvent 类提供了一个由输入上下文向输入对象发送的事件。更多

Header: #include <QInputMethodQueryEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
继承: QEvent

公共函数

QInputMethodQueryEvent(Qt::InputMethodQueries queries)
Qt::InputMethodQueries queries() const
void setValue(Qt::InputMethodQuery query, const QVariant &value)
QVariant value(Qt::InputMethodQuery query) const

详细说明

输入法使用它来查询对象的一组属性,以便能够支持复杂的输入法操作,如支持环绕文本和重新转换。

queries() 指定了要查询的属性。

在调用accept() 之前,对象应在事件上调用setValue() 填入请求的数据。

成员函数文档

[explicit] QInputMethodQueryEvent::QInputMethodQueryEvent(Qt::InputMethodQueries queries)

queries 给定的属性构建一个查询事件。

Qt::InputMethodQueries QInputMethodQueryEvent::queries() const

返回事件查询的属性。

void QInputMethodQueryEvent::setValue(Qt::InputMethodQuery query, const QVariant &value)

将属性query 设置为value

另请参见 value().

QVariant QInputMethodQueryEvent::value(Qt::InputMethodQuery query) const

返回query 属性的值。

另请参阅 setValue() 。

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