用于 Qt Virtual Keyboard 的扩展插件。 更多...
头: | #include <QVirtualKeyboardExtensionPlugin> |
CMake: |
find_package(Qt6 COMPONENTS VirtualKeyboard REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::VirtualKeyboard) |
qmake: | QT += virtualkeyboard |
继承: | QObject |
virtual void | registerTypes (const char * uri ) const |
扩展插件允许定制和扩展 Qt Virtual Keyboard 功能。扩展插件可以提供额外的键盘布局和输入法。
虚拟键盘在启动时加载所有扩展插件。它搜索
plugins/virtualkeyboard
目录并匹配在插件中找到的元数据。若有 2 个或更多个扩展插件具有相同
名称
,它加载的那个具有最高
版本
编号。
另请参阅 虚拟 Keyboard 扩展插件 .
[虚拟]
void
QVirtualKeyboardExtensionPlugin::
registerTypes
(const
char
*
uri
) const
若插件元数据包含
InputMethod
field defining an input method name, Qt Virtual Keyboard will call registerTypes() for registering the input method as QML type. The type must be registered with a
uri
if the input method is used by the default keyboard layouts. If the input method type is only used in private layouts (known only by the plugin), the uri can be omitted and chosen freely.