InputContext QML Type
入力コンテキストへのアクセスを提供します。詳細...
Import Statement: | import QtQuick.VirtualKeyboard |
In C++: | QVirtualKeyboardInputContext |
プロパティ
- anchorPosition : int
(since QtQuick.VirtualKeyboard 2.2)
- anchorRectIntersectsClipRect : bool
- anchorRectangle : rect
(since QtQuick.VirtualKeyboard 2.1)
- animating : bool
- capsLockActive : bool
(since QtQuick.VirtualKeyboard 2.4)
- cursorPosition : int
- cursorRectIntersectsClipRect : bool
- cursorRectangle : rect
- inputEngine : InputEngine
- inputMethodHints : int
- keyboardObserver : KeyboardObserver
(since QtQuick.VirtualKeyboard 6.1)
- locale : string
- preeditText : string
- selectedText : string
- selectionControlVisible : bool
- shiftActive : bool
(since QtQuick.VirtualKeyboard 2.4)
- surroundingText : string
- uppercase : bool
(since QtQuick.VirtualKeyboard 2.2)
方法
- void clear()
- void commit()
- void commit(string text, int replaceFrom, int replaceLength)
- void sendKeyClick(int key, string text, int modifiers)
詳細説明
InputContext はシングルトンインスタンスとしてアクセスできる。
プロパティの説明
anchorPosition : int |
このプロパティは、アンカー位置が変更されたときに変更されます。
このプロパティは QtQuick.VirtualKeyboard 2.2 で導入されました。
anchorRectIntersectsClipRect : bool |
選択アンカーの外接矩形が、露出している入力項目の矩形と交差している場合、true
を保持します。
Qt::ImAnchorRectangle およびQt::ImInputItemClipRectangleも参照してください 。
anchorRectangle : rect |
このプロパティは、アンカー矩形が変更されると変更されます。
このプロパティは、QtQuick.VirtualKeyboard 2.1 で導入されました。
animating : bool |
このプロパティは、UI の遷移状態などでアニメーション状態を設定するために使用します。
capsLockActive : bool |
このプロパティは、キャップスロックの状態が変化したときに変更されます。
このプロパティは QtQuick.VirtualKeyboard 2.4 で導入されました。
cursorPosition : int |
このプロパティは、カーソル位置が変更されたときに変更されます。
cursorRectIntersectsClipRect : bool |
入力カーソルの外接矩形が、露出している入力項目の矩形と交差している場合、true
を保持する。
Qt::ImCursorRectangle およびQt::ImInputItemClipRectangleも参照のこと 。
cursorRectangle : rect |
このプロパティは、カーソルの矩形が変化すると変更される。
inputEngine : InputEngine |
このプロパティは入力エンジンを格納する。
inputMethodHints : int |
このプロパティは、入力メソッドのヒントが変更されると変更されます。
keyboardObserver : KeyboardObserver |
このプロパティは、キーボード変更イベントの通知を受け取るために使用できます。
このプロパティは QtQuick.VirtualKeyboard 6.1 で導入されました。
locale : string |
このプロパティは、入力ロケールが変更されると変更されます。
preeditText : string |
このプロパティは、編集前のテキストを設定します。
selectedText : string |
このプロパティは、選択テキストが変更されたときに変更されます。
selectionControlVisible : bool |
選択コントロールが現在表示されている場合、true
を保持します。
shiftActive : bool |
このプロパティは、シフト状態が変更されたときに変更されます。
このプロパティは QtQuick.VirtualKeyboard 2.4 で導入されました。
surroundingText : string |
このプロパティは、カーソルの周囲のテキストが変更されたときに変更されます。
uppercase : bool |
このプロパティは、shiftActive またはcapsLockActive のいずれかがtrue
のとき、true
になります。
このプロパティは QtQuick.VirtualKeyboard 2.2 で導入されました。
メソッドの説明
void clear() |
編集前テキストをクリアします。
void commit() |
現在の編集前テキストをコミットします。
最終的なtext を入力アイテムにコミットし、オプションで編集前テキストの開始位置から相対的にテキストを変更します。replaceFromが 0 以外の場合、text はreplaceFromに相対する内容をreplaceLength の長さで置き換えます。
現在フォーカスのある入力アイテムに、与えられたkey 、text 、modifiers でキークリックイベントを送ります。
© 2025 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.