KeyboardLayout QML Type
キーボードレイアウト。詳細...
Import Statement: | import QtQuick.VirtualKeyboard.Components |
Inherits: |
プロパティ
- inputMethod : var
- inputMode : int
- keyWeight : real
- sharedLayouts : var
- smallTextVisible : bool
(since QtQuick.VirtualKeyboard 2.0)
方法
詳細説明
この型はキーボード・レイアウトのルート要素である。新しいキーボード・レイアウトを構築するにはこの要素を使用する。
例
import QtQuick import QtQuick.Layouts import QtQuick.VirtualKeyboard // file: layouts/en_GB/main.qml KeyboardLayout { KeyboardRow { Key { key: Qt.Key_Q text: "q" } Key { key: Qt.Key_W text: "w" } Key { key: Qt.Key_E text: "e" } Key { key: Qt.Key_R text: "r" } Key { key: Qt.Key_T text: "t" } Key { key: Qt.Key_Y text: "y" } } }
プロパティの説明
inputMethod : var |
このレイアウトで使用する入力メソッドを設定します。
このプロパティにより、このレイアウトでカスタム入力メソッドを使用することができます。
inputMode : int |
このレイアウトで使用する入力モードを設定します。
デフォルトでは、仮想キーボードは異なるキーボードレイアウトに切り替えたときに、現在の入力モードを保持しようとします。
現在の入力モードが現在のコンテキストで有効でない場合、デフォルトの入力モードがinputメソッドによって指定されます。
keyWeight : real |
すべての子キーのキーウェイトを設定します。
デフォルト値はレイアウト階層の親要素から継承されます。
sharedLayouts : var |
createInputMethod() 関数で作成された入力メソッドを共有するレイアウト名のリスト。
このリストが空(デフォルト)の場合、入力メソッドは他のレイアウトと共有されず、レイアウトが変更されると破棄されます。
このリストには、レイアウトタイプの名前(例:['symbols'])のみを含める必要があります。現在のレイアウトがリストに含まれている必要はありません。
smallTextVisible : bool |
すべての子キーにsmallTextVisible
。
デフォルト値は、レイアウト階層の親要素から継承されます。
このプロパティは QtQuick.VirtualKeyboard 2.0 で導入されました。
メソッドの説明
createInputMethod() |
この関数は、キーボードレイアウトによってオーバーライドされ、入力メソッドオブジェクトを動的に作成することができます。デフォルトの実装はnull
を返します。
この関数によって作成された入力メソッドオブジェクトは、場合によってはキーボードレイアウトの遷移よりも長くなることがあります。特に、sharedLayouts プロパティにリストされたレイアウト間の遷移に適用されます。
© 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.