To use a field similar to HTML
input in Pyqt4, I usually use
But how can I make a field similar to the
input password, which is a specific field for entering passwords?
Is there a way to define the "asterisks" that hide the text typed in QLineEdit itself, or is there a specific one?
setEchoMode passing the enum
QLineEdit.PasswordEchoOnEdit as a parameter
from PyQt4 import QtGui #... txtPw = QtGui.QLineEdit() txtPw.setEchoMode(QtGui.QLineEdit.Password) txtPw.show()
QLineEdit.PasswordShows only "asterisks" when typing some text
QLineEdit.PasswordEchoOnEditShows the typed character and then changes it to an "asterisk"
echoMode enum values here