- Qt 6.4
- Qt Virtual Keyboard
- QML Types
- QtQuick.VirtualKeyboard.Settings
- VirtualKeyboardSettings
- Qt Virtual Keyboard | Commercial or GPLv3

# VirtualKeyboardSettings QML Type

Provides settings for virtual keyboard. More...

Import Statement: | import QtQuick.VirtualKeyboard.Settings
Since: | QtQuick.VirtualKeyboard 1.2

- List of all members, including inherited members

## Properties

- activeLocales : list<string>
- availableLocales : list<string>
- defaultDictionaryDisabled : bool
- defaultInputMethodDisabled : bool
- fullScreenMode : bool
- handwritingModeDisabled : bool
- hwrTimeoutForAlphabetic : bool
- hwrTimeoutForCjk : bool
- inputMethodHints : int
- locale : string
- styleName : string
- userDataPath : bool
- wordCandidateList
  - wordCandidateList.alwaysVisible : bool
  - wordCandidateList.autoHideDelay : int

## Signals

- userDataReset()

## Detailed Description

This type provides a VirtualKeyboardSettings singleton instance, which can be used to configure the virtual keyboard settings.

Please note that the settings have only effect in the current application's lifetime, that is, configuration changes are not permanent.

For example, to change the keyboard style in application:

     Component.onCompleted: VirtualKeyboardSettings.styleName = "retro"

## Property Documentation

[since QtQuick.VirtualKeyboard.Settings 2.0] activeLocales : list<string>

This property contains a list of activated languages of the virtual keyboard.

The list of active languages is a subset of the available languages, and can be used to limit the list of available languages in the application lifetime.

The list of languages will be shown based on the specified ordering.

This property was introduced in QtQuick.VirtualKeyboard.Settings 2.0.

[read-only, since QtQuick.VirtualKeyboard.Settings 2.0] availableLocales : list<string>

This property contains a list of languages supported by the virtual keyboard.

This list is read-only and depends on the build-time configuration of the virtual keyboard.

This property was introduced in QtQuick.VirtualKeyboard.Settings 2.0.

[since QtQuick.VirtualKeyboard.Settings 6.1] defaultDictionaryDisabled : bool

This property disables the default dictionary. The purpose of this setting is to be able to use a custom dictionary only instead of the standard dictionary.

This property was introduced in QtQuick.VirtualKeyboard.Settings 6.1.

[since QtQuick.VirtualKeyboard.Settings 6.1] defaultInputMethodDisabled : bool

This property disables the default input method. The purpose of this setting is to be able to override the default input method with the plain input method, disabling its functionality.

This property was introduced in QtQuick.VirtualKeyboard.Settings 6.1.

[since QtQuick.VirtualKeyboard.Settings 2.2] fullScreenMode : bool

This property enables the fullscreen mode for the virtual keyboard.

In fullscreen mode, the virtual keyboard replicates the contents of the focused input field to the fullscreen input field located at the top of the keyboard.

For example, to activate the fullscreen mode when the screen aspect ratio is greater than 16:9:

     Binding {
         target: VirtualKeyboardSettings
         property: "fullScreenMode"
         value: (Screen.width / Screen.height) > (16.0 / 9.0)
     }

This property was introduced in QtQuick.VirtualKeyboard.Settings 2.2.

[since QtQuick.VirtualKeyboard.Settings 6.1] handwritingModeDisabled : bool

This property allows to disable handwriting input mode, if it is otherwise available in the system.

When this property is set to `true`, the handwriting button is hidden from the keyboard layout and the user cannot switch to handwriting input mode.

This property was introduced in QtQuick.VirtualKeyboard.Settings 6.1.

[since QtQuick.VirtualKeyboard.Settings 6.1] hwrTimeoutForAlphabetic : bool

This property sets the handwriting recognition timeout for alphabetical languages.

By default, the timeout is 500 millliseconds.

This property was introduced in QtQuick.VirtualKeyboard.Settings 6.1.

[since QtQuick.VirtualKeyboard.Settings 6.1] hwrTimeoutForCjk : bool

This property sets the handwriting recognition timeout for Chinese / Japanese / Korean languages.

By default, the timeout is 500 millliseconds.

This property was introduced in QtQuick.VirtualKeyboard.Settings 6.1.

[since QtQuick.VirtualKeyboard.Settings 6.1] inputMethodHints : int

This property allows to set persistent input method hints.

The value of this property is combined with the input method hints from the input control. For example, to disable predictive text input, this property can be set to `Qt::ImhNoPredictiveText`.

This property was introduced in QtQuick.VirtualKeyboard.Settings 6.1.

[since QtQuick.VirtualKeyboard.Settings 2.0] locale : string

This property provides the default locale for the keyboard.

When the locale is not specified, the default system locale is used instead.

If the keyboard locale is different from the new default locale, keyboard language is changed immediately to reflect the new locale. If the locale setting is incorrect, or it is not in the list of supported locales, it is ignored and the default setting is used instead.

A locale is supported if it is included in the list of availableLocales.

This property was introduced in QtQuick.VirtualKeyboard.Settings 2.0.

styleName : string

This property provides the current style. Application can change the keyboard style by setting the styleName to different value.

The system wide keyboard style can be affected by setting the QT_VIRTUALKEYBOARD_STYLE environment variable.

[since QtQuick.VirtualKeyboard.Settings 6.1] userDataPath : bool

This property sets the user data path for the virtual keyboard and its plugins.

By default, the user data path is set to GenericConfigLocation + "/qtvirtualkeyboard".

This property was introduced in QtQuick.VirtualKeyboard.Settings 6.1.

wordCandidateList group
[since QtQuick.VirtualKeyboard.Settings 2.2] wordCandidateList.alwaysVisible : bool
[since QtQuick.VirtualKeyboard.Settings 2.2] wordCandidateList.autoHideDelay : int

Name | Description
--- | ---
autoHideDelay | This property defines the delay, in milliseconds, after which the word candidate list is hidden if empty. If the value is `0`, the list is immediately hidden when cleared. If the value is `-1`, the list is visible until input focus changes, or the input panel is hidden. The default value is `5000` milliseconds.
alwaysVisible | This property defines whether the word candidate list should always remain visible. The default value is `false`.

autoCommitWord

This property enables the automatic commit feature that is activated when the word candidate list is narrowed down to a single candidate.

The automatic commit feature takes effect when the word candidate list initially contains multiple words and is reduced to single word after additional input. This word will be selected and committed automatically without user interaction.

This property is set to `false` by default.

This QML property was introduced in QtQuick.VirtualKeyboard.Settings 2.2.

## Signal Documentation

userDataReset()

The application triggers this signal prior to the user's data being reset to indicate to the virtual keyboard that all files must be closed in the user data directory.

Note: The corresponding handler is `onUserDataReset`.