QVirtualKeyboardInputContext Class
入力コンテキストへのアクセスを提供します。詳細...
ヘッダ | #include <QVirtualKeyboardInputContext> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS VirtualKeyboard) target_link_libraries(mytarget PRIVATE Qt6::VirtualKeyboard) |
qmake | QT += virtualkeyboard |
QML で | InputContext |
継承: | QObject |
プロパティ
|
|
パブリック機能
int | anchorPosition() const |
bool | anchorRectIntersectsClipRect() const |
QRectF | anchorRectangle() const |
void | clear() |
void | commit() |
void | commit(const QString &text, int replaceFrom = 0, int replaceLength = 0) |
int | cursorPosition() const |
bool | cursorRectIntersectsClipRect() const |
QRectF | cursorRectangle() const |
QVirtualKeyboardInputEngine * | inputEngine() const |
Qt::InputMethodHints | inputMethodHints() const |
bool | isAnimating() const |
bool | isCapsLockActive() const |
bool | isSelectionControlVisible() const |
bool | isShiftActive() const |
bool | isUppercase() const |
QVirtualKeyboardObserver * | keyboardObserver() const |
QString | locale() const |
QString | preeditText() const |
QString | selectedText() const |
void | sendKeyClick(int key, const QString &text, int modifiers = 0) |
void | setAnimating(bool isAnimating) |
void | setPreeditText(const QString &text, QList<QInputMethodEvent::Attribute> attributes = QList<QInputMethodEvent::Attribute>(), int replaceFrom = 0, int replaceLength = 0) |
QString | surroundingText() const |
シグナル
void | anchorPositionChanged() |
void | anchorRectIntersectsClipRectChanged() |
void | anchorRectangleChanged() |
void | animatingChanged() |
void | capsLockActiveChanged() |
void | cursorPositionChanged() |
void | cursorRectIntersectsClipRectChanged() |
void | cursorRectangleChanged() |
void | inputMethodHintsChanged() |
void | localeChanged() |
void | preeditTextChanged() |
void | selectedTextChanged() |
void | selectionControlVisibleChanged() |
void | shiftActiveChanged() |
void | surroundingTextChanged() |
void | uppercaseChanged() |
プロパティの説明
[read-only]
anchorPosition : const int
このプロパティはアンカー位置を保持する。
このプロパティは、アンカー位置が変更されると変更される。
アクセス関数
int | anchorPosition() const |
通知シグナル
void | anchorPositionChanged() |
[read-only]
anchorRectIntersectsClipRect : const bool
選択アンカーの外接矩形が、露出している入力項目の矩形と交差している場合にtrue
を保持する。
アクセス関数:
bool | anchorRectIntersectsClipRect() const |
通知シグナル:
void | anchorRectIntersectsClipRectChanged() |
Qt::ImAnchorRectangle およびQt::ImInputItemClipRectangleも参照のこと 。
[read-only]
anchorRectangle : const QRectF
このプロパティはアンカー矩形を保持する。
このプロパティは、アンカー矩形が変更されると変更される。
アクセス関数
QRectF | anchorRectangle() const |
通知シグナル
void | anchorRectangleChanged() |
animating : bool
このプロパティは、アニメーション状態を保持する。
このプロパティは、UIの遷移状態などで、アニメーション状態を設定するために使用します。
アクセス関数
bool | isAnimating() const |
void | setAnimating(bool isAnimating) |
通知シグナル
void | animatingChanged() |
[read-only]
capsLockActive : const bool
このプロパティは、キャップスロックの状態を保持する。
このプロパティは、キャップスロックの状態が変化すると変更される。
アクセス関数
bool | isCapsLockActive() const |
通知シグナル
void | capsLockActiveChanged() |
[read-only]
cursorPosition : const int
このプロパティはカーソル位置を保持する。
このプロパティは、カーソル位置が変化したときに変更される。
アクセス関数
int | cursorPosition() const |
ノーティファイアシグナル
void | cursorPositionChanged() |
[read-only]
cursorRectIntersectsClipRect : const bool
入力カーソルの外接矩形が、露出している入力項目の矩形と交差している場合、true
を保持する。
アクセス関数:
bool | cursorRectIntersectsClipRect() const |
通知シグナル:
void | cursorRectIntersectsClipRectChanged() |
Qt::ImCursorRectangle およびQt::ImInputItemClipRectangleも参照のこと 。
[read-only]
cursorRectangle : const QRectF
このプロパティはカーソルの矩形を保持する。
このプロパティは、カーソルの矩形が変更されたときに変更される。
アクセス関数
QRectF | cursorRectangle() const |
ノーティファイアシグナル
void | cursorRectangleChanged() |
[read-only]
inputEngine : QVirtualKeyboardInputEngine* const
このプロパティは、入力エンジンを保持する。
このプロパティは入力エンジンを保持する。
アクセス関数:
QVirtualKeyboardInputEngine * | inputEngine() const |
[read-only]
inputMethodHints : const Qt::InputMethodHints
このプロパティは入力メソッドのヒントを保持する。
このプロパティは、入力メソッドのヒントが変更されると変更される。
アクセス関数
Qt::InputMethodHints | inputMethodHints() const |
通知シグナル
void | inputMethodHintsChanged() |
[read-only, since QtQuick.VirtualKeyboard 6.1]
keyboardObserver : QVirtualKeyboardObserver* const
キーボードオブザーバオブジェクトを保持し、キーボード変更イベントの通知を受け取るために使用できます。
このプロパティは QtQuick.VirtualKeyboard 6.1 で導入されました。
アクセス関数です:
QVirtualKeyboardObserver * | keyboardObserver() const |
[read-only]
locale : const QString
このプロパティはロケールを保持する。
このプロパティは、入力ロケールが変更されると変更される。
アクセス関数
QString | locale() const |
通知シグナル
void | localeChanged() |
preeditText : QString
このプロパティは編集前テキストを保持する。
このプロパティは、編集前テキストを設定する。
アクセス関数
QString | preeditText() const |
void | setPreeditText(const QString &text, QList<QInputMethodEvent::Attribute> attributes = QList<QInputMethodEvent::Attribute>(), int replaceFrom = 0, int replaceLength = 0) |
通知シグナル
void | preeditTextChanged() |
[read-only]
selectedText : const QString
このプロパティは選択されたテキストを保持する。
このプロパティは、選択テキストが変更されると変更される。
アクセス関数
QString | selectedText() const |
通知シグナル
void | selectedTextChanged() |
[read-only]
selectionControlVisible : const bool
選択コントロールが現在表示されている場合、true
を保持する。
アクセス関数:
bool | isSelectionControlVisible() const |
通知シグナル:
void | selectionControlVisibleChanged() |
[read-only]
shiftActive : const bool
本プロパティは、シフト状態を保持する。
本プロパティは、シフト状態が変化した場合に変更される。
アクセス関数
bool | isShiftActive() const |
ノーティファイアシグナル
void | shiftActiveChanged() |
[read-only]
surroundingText : const QString
このプロパティは、カーソルの周囲のテキストを保持する。
このプロパティは、カーソルの周囲のテキストが変更されたときに変更される。
アクセス関数
QString | surroundingText() const |
ノーティファイアシグナル
void | surroundingTextChanged() |
[read-only]
uppercase : const bool
このプロパティは大文字の状態を保持する。
このプロパティは、shiftActive またはcapsLockActive のいずれかがtrue
のとき、true
となる。
アクセス関数:
bool | isUppercase() const |
Notifier シグナル:
void | uppercaseChanged() |
メンバー関数ドキュメント
[invokable]
void QVirtualKeyboardInputContext::clear()
編集前のテキストを消去します。
注: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[invokable]
void QVirtualKeyboardInputContext::commit()
現在の編集前のテキストをコミットします。
注: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[invokable]
void QVirtualKeyboardInputContext::commit(const QString &text, int replaceFrom = 0, int replaceLength = 0)
最終的なtext を入力アイテムにコミットし、オプションで編集前のテキストの開始位置から相対的にテキストを修正する。replaceFrom がゼロでない場合、text はreplaceFrom に相対する内容をreplaceLength の長さで置き換えます。
注: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[invokable]
void QVirtualKeyboardInputContext::sendKeyClick(int key, const QString &text, int modifiers = 0)
与えられたkey 、text 、modifiers で、現在フォーカスのある入力項目にキークリックイベントを送ります。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
© 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.