本页内容

TraceInputArea QML Type

一个用于收集触摸输入数据的专用MultiPointTouchArea 。更多内容...

Import Statement: import QtQuick.VirtualKeyboard.Components
Since: QtQuick.VirtualKeyboard 2.0
Inherits:

MultiPointTouchArea

属性

详细说明

此类型负责处理触摸屏与输入引擎之间的轨迹交互。

这些轨迹是通过当前KeyboardStyle 的traceCanvasDelegate 属性中的委托渲染的。

属性文档

boundingBox : rect [read-only]

轨迹输入的边界框。

该属性为只读属性,会根据项目大小和边距自动更新。

canvasType : string

此绘图区域的画布类型。

该属性可用于区分不同类型的画布。例如,在全屏手写模式下,该属性设置为"fullscreen" ;而在键盘手写模式下,该属性设置为"keyboard" 。

horizontalRulers : var

输入区域中的水平标尺列表。

这些标尺的定义是距离boundingBox 顶边一定像素数的位置。

以下是一个演示如何定义标尺的示例:

horizontalRulers: [boundingBox.height / 3, boundingBox.height / 3 * 2]
verticalRulers: [boundingBox.width / 3, boundingBox.width / 3 * 2]

patternRecognitionMode : int

此输入区域的模式识别模式。

默认值为InputEngine.PatternRecognitionMode.None 。

verticalRulers : var

输入区域中的垂直标尺列表。

这些标尺以相对于boundingBox 左边缘的像素数来定义。

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