Class: QgsPasswordLineEdit

QLineEdit subclass with built in support for showing/hiding the entered password.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsPasswordLineEdit

Base classes

QLineEdit

QWidget

QObject

QPaintDevice

Methods

setPasswordVisibility

Set state of the password's visibility

setShowLockIcon

Define if a lock icon shall be shown on the left of the widget

showLockIcon

Returns if a lock icon shall be shown on the left of the widget

class qgis.gui.QgsPasswordLineEdit[source]

Bases: QLineEdit

__init__(parent: QWidget | None = None, passwordVisible: bool = False)

Constructor for QgsPasswordLineEdit.

Parameters:
  • parent (Optional[QWidget] = None) – parent widget

  • passwordVisible (bool = False) – Initial state of the password’s visibility

setPasswordVisibility(self, visible: bool)[source]

Set state of the password’s visibility

Parameters:

visible (bool)

setShowLockIcon(self, visible: bool)[source]

Define if a lock icon shall be shown on the left of the widget

Parameters:

visible (bool) – set to False to hide the lock icon

showLockIcon(self) bool[source]

Returns if a lock icon shall be shown on the left of the widget

Return type:

bool