InputContext QML Type

提供對輸入上下文的訪問。 更多...

import 語句: import QtQuick.VirtualKeyboard 2.4
實例化: QVirtualKeyboardInputContext

特性

方法

詳細描述

The InputContext can be accessed as singleton instance.

特性文檔編製

anchorPosition : int

此特性被改變,當錨點位置改變時。

This property was introduced in QtQuick.VirtualKeyboard 2.2.

[read-only] anchorRectIntersectsClipRect : bool

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

另請參閱 Qt::ImAnchorRectangle and Qt::ImInputItemClipRectangle .

anchorRectangle : rect

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

此特性被改變,當大寫鎖定狀態改變時。

This property was introduced in QtQuick.VirtualKeyboard 2.4.

cursorPosition : int

此特性被改變,當光標位置改變時。

[read-only] cursorRectIntersectsClipRect : bool

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

另請參閱 Qt::ImCursorRectangle and Qt::ImInputItemClipRectangle .

cursorRectangle : rect

This property is changed when the cursor rectangle changes.

inputEngine : InputEngine

This property stores the input engine.

inputMethodHints : int

This property is changed when the input method hints changes.

locale : string

This property is changed when the input locale changes.

preeditText : string

This property sets the pre-edit text.

selectedText : string

This property is changed when the selected text changes.

[read-only] selectionControlVisible : bool

保持 true if the selection control is currently visible.

shiftActive : bool

This property is changed when the shift status changes.

This property was introduced in QtQuick.VirtualKeyboard 2.4.

surroundingText : string

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

uppercase : bool

此特性是 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 到目前擁有聚焦的輸入項。