提供用於虛擬鍵盤的設置。 更多...
| import 語句: |
import QtQuick.VirtualKeyboard.Settings
|
| Since: | QtQuick.VirtualKeyboard 1.2 |
(since QtQuick.VirtualKeyboard.Settings 2.0)
(since QtQuick.VirtualKeyboard.Settings 2.0)
(since QtQuick.VirtualKeyboard.Settings 6.8)
(since QtQuick.VirtualKeyboard.Settings 6.1)
(since QtQuick.VirtualKeyboard.Settings 6.1)
(since QtQuick.VirtualKeyboard.Settings 2.2)
(since QtQuick.VirtualKeyboard.Settings 6.1)
(since QtQuick.VirtualKeyboard.Settings 6.1)
(since QtQuick.VirtualKeyboard.Settings 6.1)
(since QtQuick.VirtualKeyboard.Settings 6.1)
(since QtQuick.VirtualKeyboard.Settings 2.0)
(since QtQuick.VirtualKeyboard.Settings 6.1)
(since QtQuick.VirtualKeyboard.Settings 6.6)
(since QtQuick.VirtualKeyboard.Settings 2.2)
(since QtQuick.VirtualKeyboard.Settings 2.2)
(since QtQuick.VirtualKeyboard.Settings 2.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.
The list of languages will be shown based on the specified ordering.
該特性在 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 引入。
|
closeOnReturn
:
bool
|
This property enables hiding of virtual keyboard.
當此特性被設為
true
, the virtual keyboard is hidden when
Qt::Key_Enter
or
Qt::Key_Return
key released. The default is
false
.
This property was introduced in QtQuick.VirtualKeyboard.Settings 6.8.
|
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.
該特性在 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.
該特性在 QtQuick.VirtualKeyboard.Settings 6.1 引入。
|
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 引入。
|
handwritingModeDisabled
:
bool
|
This property allows to disable handwriting input mode, if it is otherwise available in the system.
當此特性被設為
true
, the handwriting button is hidden from the keyboard layout and the user cannot switch to handwriting input mode.
該特性在 QtQuick.VirtualKeyboard.Settings 6.1 引入。
|
hwrTimeoutForAlphabetic
:
bool
|
This property sets the handwriting recognition timeout for alphabetical languages.
默認情況下,超時為 500 毫秒。
該特性在 QtQuick.VirtualKeyboard.Settings 6.1 引入。
|
hwrTimeoutForCjk
:
bool
|
This property sets the handwriting recognition timeout for Chinese / Japanese / Korean languages.
默認情況下,超時為 500 毫秒。
該特性在 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
.
該特性在 QtQuick.VirtualKeyboard.Settings 6.1 引入。
|
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.
|
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".
該特性在 QtQuick.VirtualKeyboard.Settings 6.1 引入。
|
visibleFunctionKeys
:
enumeration
|
This setting adjusts the visibility of specific function keys in the keyboard layout, allowing them to be either displayed or hidden. When a function key is not visible, its functionality remains accessible through the gear menu.
The value can be combination of the following flags:
QtVirtualKeyboard.KeyboardFunctionKeys.None
All function keys are hidden
QtVirtualKeyboard.KeyboardFunctionKeys.Hide
Hide function key is visible
QtVirtualKeyboard.KeyboardFunctionKeys.Language
Language function key is visible
QtVirtualKeyboard.KeyboardFunctionKeys.All
All function keys are visible
默認為
QtVirtualKeyboard.KeyboardFunctionKeys.All
.
This property was introduced in QtQuick.VirtualKeyboard.Settings 6.6.
|
wordCandidateList group |
|---|
|
wordCandidateList.alwaysVisible
:
bool
|
|
wordCandidateList.autoHideDelay
:
int
|
| 名稱 | 描述 |
|---|---|
| autoHideDelay |
This property defines the delay, in milliseconds, after which the word candidate list is hidden if empty.
If the value is
If the value is
默認值為
|
| alwaysVisible |
This property defines whether the word candidate list should always remain visible.
默認值為
|
| 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
|
This QML property was introduced in QtQuick.VirtualKeyboard.Settings 2.2.
|
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.
注意:
相應處理程序是
onUserDataReset
.