InputContext QML Type

入力コンテキストへのアクセスを提供します。詳細...

Import Statement: import QtQuick.VirtualKeyboard
In C++: QVirtualKeyboardInputContext

プロパティ

方法

詳細説明

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 QtQuick.VirtualKeyboard 6.1]

このプロパティは、キーボード変更イベントの通知を受け取るために使用できます。

このプロパティは QtQuick.VirtualKeyboard 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が 0 以外の場合、textreplaceFromに相対する内容をreplaceLength の長さで置き換えます。


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

現在フォーカスのある入力アイテムに、与えられたkeytextmodifiers でキークリックイベントを送ります。


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