I created a QlineEdit
, the content of which I would like to mask, I resorted to the QLineEdit.Password
EchoMode
, but unfortunately it doesn't let me specify the mask character. I stumbled upon the lineedit-password-character
StyleSheet
proprety, but it does nothing.
password_field.setEchoMode(QtWidgets.QLineEdit.Password)
password_field.setStyleSheet("color: #88c0d0; border: 0; lineedit-password-character: 2731; selection-background-color: #88c0d0; selection-color: #2e3440;")
The mask character I want is *
# Password field
password_field = QtWidgets.QLineEdit(window)
password_field.resize(input_window.width() - password_label.width() - input_field_offset - input_window_padding * 2, password_label.height())
password_field.move(password_label.x() + password_label.width() + input_field_offset, password_label.y())
password_field.setEchoMode(QtWidgets.QLineEdit.Password)
password_field.setStyleSheet("color: #88c0d0; border: 0; lineedit-password-character: 61; selection-background-color: #88c0d0; selection-color: #2e3440;")