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