IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

EnterKeyAction QML Type

Provides attached properties for customizing the enter key.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

EnterKeyAction QML Type

  • Import Statement: import QtQuick.VirtualKeyboard

  • Group: EnterKeyAction is part of qmlclass, qtvirtualkeyboard-qml

Detailed Description

The EnterKeyAction type provides attached properties which allows customizing the enter key button of the keyboard.

The EnterKeyAction must be used directly inside the item receiving input focus, e.g. TextInput.

For example:

 
Sélectionnez
TextInput {
    id: myInput
    EnterKeyAction.enabled: myInput.text.length > 0 || myInput.inputMethodComposing
    EnterKeyAction.label: "Next"
    Keys.onReleased: {
        if (event.key === Qt.Key_Return) {
            // execute action
        }
    }
}

Attached Property Documentation

 

EnterKeyAction.actionId : int

Sets the action id for the enter key in virtual keyboard. When the action id is set, it takes preference over the label and sets the icon for the enter key.

  • EnterKeyAction.None No action defined.

  • EnterKeyAction.Go Action performs go operation. For example taking user to the entered url.

  • EnterKeyAction.Search Action performs search operation.

  • EnterKeyAction.Send Action sends the entered text.

  • EnterKeyAction.Next Action moves the input focus to the next field accepting text input.

  • EnterKeyAction.Done Same as EnterKeyAction.Next, except all the text input is done.

EnterKeyAction.enabled : bool

Enables or disables the enter key button in virtual keyboard.

EnterKeyAction.label : string

Sets the label for the enter key in virtual keyboard.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+