C
KeyboardLayout QML Type
Keyboard layout. More...
Import Statement: | import QtQuick.VirtualKeyboard.Components |
Inherits: |
Properties
- inputMethod : AbstractInputMethod
- inputMode : int
- keyWeight : real
- smallTextVisible : bool
Detailed Description
This type is the root element of the keyboard layout. Use this element to build a new keyboard layout.
Example:
import QtQuick import QtQuick.Layouts import QtQuick.VirtualKeyboard 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" } } }
Note: The bundled layouts contain sharedLayouts
property and createInputMethod()
function, which are ignored by the qmltocpp
tool. You need not include these in your custom layout.
Property Documentation
inputMethod : AbstractInputMethod |
Sets the input method to be used in this layout.
This property allows a custom input method to be used in this layout.
inputMode : int |
Sets the input mode to be used in this layout.
By default, the virtual keyboard attempts to preserve the current input mode when switching to a different keyboard layout.
If the current input mode is not valid in the current context, the default input mode is specified by the input method.
keyWeight : real |
Specifies the default key weight used for all keys in this keyboard layout. The key weight is a proportional value which affects the size of individual keys in relation to each other.
The default value is 0.
smallTextVisible : bool |
Sets the smallTextVisible
for all children keys.
The default value is false
.
Available under certain Qt licenses.
Find out more.