VirtualKeyboardSettings QML 类型

提供用于虚拟键盘的设置。 更多...

import 语句: import QtQuick.VirtualKeyboard.Settings 2.2
Since: QtQuick.VirtualKeyboard 1.2

特性

详细描述

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.

例如,要改变应用程序键盘样式:

Component.onCompleted: VirtualKeyboardSettings.styleName = "retro"
					

特性文档编制

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.

该特性在 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.

该特性在 QtQuick.VirtualKeyboard.Settings 2.0 引入。

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)
}
								

该特性在 QtQuick.VirtualKeyboard.Settings 2.2 引入。

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 .

该特性在 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.

wordCandidateList group

wordCandidateList.autoHideDelay : int

wordCandidateList.alwaysVisible : bool

名称 描述
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.

默认值为 5000 毫秒。

alwaysVisible

This property defines whether the word candidate list should always remain visible.

默认值为 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 在默认情况下。

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