InputContext QML Type

提供对输入上下文的访问。 更多...

import 语句: import QtQuick.VirtualKeyboard
实例化: QVirtualKeyboardInputContext

特性

方法

详细描述

The InputContext can be accessed as singleton instance.

特性文档编制

anchorPosition : int [read-only, since QtQuick.VirtualKeyboard 2.2]

此特性被改变,当锚点位置改变时。

This property was introduced in QtQuick.VirtualKeyboard 2.2.

anchorRectIntersectsClipRect : bool [read-only]

保持 true if the bounding rectangle of the selection anchor intersects the exposed input item rectangle.

另请参阅 Qt::ImAnchorRectangle and Qt::ImInputItemClipRectangle .

anchorRectangle : rect [read-only, since QtQuick.VirtualKeyboard 2.1]

This property is changed when the anchor rectangle changes.

This property was introduced in QtQuick.VirtualKeyboard 2.1.

animating : bool

Use this property to set the animating status, for example during UI transitioning states.

capsLockActive : bool [read-only, since QtQuick.VirtualKeyboard 2.4]

此特性被改变,当大写锁定状态改变时。

This property was introduced in QtQuick.VirtualKeyboard 2.4.

cursorPosition : int [read-only]

此特性被改变,当光标位置改变时。

cursorRectIntersectsClipRect : bool [read-only]

保持 true if the bounding rectangle of the input cursor intersects the exposed input item rectangle.

另请参阅 Qt::ImCursorRectangle and Qt::ImInputItemClipRectangle .

cursorRectangle : rect [read-only]

This property is changed when the cursor rectangle changes.

inputEngine : InputEngine [read-only]

This property stores the input engine.

inputMethodHints : int [read-only]

This property is changed when the input method hints changes.

keyboardObserver : KeyboardObserver [read-only, since QtQuick.VirtualKeyboard 6.1]

Holds the keyboard observer object, which can be used to receive notifications of keyboard change events.

This property was introduced in QtQuick.VirtualKeyboard 6.1.

locale : string [read-only]

This property is changed when the input locale changes.

preeditText : string

This property sets the pre-edit text.

selectedText : string [read-only]

This property is changed when the selected text changes.

selectionControlVisible : bool [read-only]

保持 true if the selection control is currently visible.

shiftActive : bool [read-only, since QtQuick.VirtualKeyboard 2.4]

This property is changed when the shift status changes.

This property was introduced in QtQuick.VirtualKeyboard 2.4.

surroundingText : string [read-only]

This property is changed when the surrounding text around the cursor changes.

uppercase : bool [read-only, since QtQuick.VirtualKeyboard 2.2]

此特性是 true shiftActive or capsLockActive is true .

This property was introduced in QtQuick.VirtualKeyboard 2.2.

方法文档编制

void clear ()

清零预编辑文本。

void commit ()

提交当前的预编辑文本。

void commit ( string text , int replaceFrom = 0, int replaceLength = 0)

提交最终 text to the input item and optionally modifies the text relative to the start of the pre-edit text. If replaceFrom is non-zero, the text replaces the contents relative to replaceFrom with a length of replaceLength .

void sendKeyClick ( int key , string text , int modifiers = 0)

发送键点击事件采用给定 key , text and modifiers 到目前拥有聚焦的输入项。