Password form in PyQt

I made a registration form, but I don’t know how to put ** in the Password field. I have only:

self.textPass = QtGui.QLineEdit(self)
+4
source share
1 answer

As stated in jedwards, use the setEchoModemethod :

Example:

from PyQt4 import QtGui, QtCore

app = QtGui.QApplication([])
pw = QtGui.QLineEdit()
pw.setEchoMode(QtGui.QLineEdit.Password)
pw.show()
app.exec_()

See also QLineEdit.EchoModeenum .

+9
source

Source: https://habr.com/ru/post/1540389/


All Articles