Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

API Documentation

Documentation for developing SailfishOS applications
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Detailed Description

PasswordField QML Type

A text field for password entry More...

Import Statement: import Sailfish.Silica 1.0
Inherits:

TextField

  • List of all members, including inherited members

Properties

  • passwordEchoMode : int
  • showEchoModeToggle : bool

Detailed Description

The PasswordField type provides a text field for password entry. It includes a button that allows the user to toggle the echoMode between TextInput.Normal and the passwordEchoMode.

For example, below the PasswordField is used as part of a UI that requests the username and password. When the EnterKey is activated within the password field, the dialog is accepted:

 import QtQuick 2.2
 import Sailfish.Silica 1.0

 Dialog {
     id: dialog

     Column {
         width: parent.width

         TextField {
             label: "Username"
             width: parent.width

             EnterKey.iconSource: "image://theme/icon-m-enter-next"
             EnterKey.onClicked: passwordField.focus = true
         }

         PasswordField {
             id: passwordField
             EnterKey.iconSource: "image://theme/icon-m-enter-accept"
             EnterKey.onClicked: dialog.accept()
         }
     }
 }

The label and placeholderText values are set to a localized translation of "Password".

Property Documentation

passwordEchoMode : int

The password field UI includes a button that allows the user to toggle the echoMode between TextInput.Normal and the value of this property.

The default value is TextInput.Password.


showEchoModeToggle : bool

Holds whether the button that toggles the echoMode should be shown.


  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn