HandwritingInputPanel QML Type
为虚拟键盘界面提供了一个手写面板插件。更多...
| Import Statement: | import QtQuick.VirtualKeyboard |
| Since: | QtQuick.VirtualKeyboard 2.0 |
| Inherits: |
属性
- active : bool
- available : bool
- inputPanel : var
详细说明
HandwritingInputPanel 是InputPanel 的附加组件,可为应用程序启用全屏手写输入功能。
HandwritingInputPanel 设计为与InputPanel 并排锚定,以全屏模式显示。其工作原理是:当手写面板“可用”时,InputPanel 将不可见。此功能为内置功能,仅需引用InputPanel 实例即可实现。
通过将available 属性设置为true ,即可启动该面板。当面板处于运行状态时,即使设置了输入焦点,键盘仍保持隐藏。当available 处于true 状态时,通过将active 属性设置为true ,即可激活手写输入。
用于控制手写模式和键盘可见性的用户界面因应用程序而异。一种建议的实现方式是在手写面板上使用一个浮动按钮:单击可切换手写模式(更改active 属性),双击可切换键盘的可见性(更改available 属性)。
HandwritingInputPanel 还提供了一个词汇候选项弹出窗口,允许用户从手写输入法生成的建议列表中选择其他词汇候选项。
属性文档
active : bool
此属性控制手写输入法的激活状态。
将该属性设置为true 可激活手写输入法。当手写输入法处于活动状态时,所有触摸输入均由手写输入面板捕获,并重定向至输入引擎进行处理。
available : bool
此属性控制手写输入法的可用状态。
将该属性设置为true 可准备手写输入法,并禁用键盘显示。
inputPanel : var
对输入面板实例的引用。
该属性必须设置为现有的输入面板实例。
© 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.