16 : QPushButton(parent),
17 iconEdit(QIcon::fromTheme(
"show", QIcon(
":/icons/view.svg"))),
18 iconEditPushed(QIcon::fromTheme(
"hide-new", QIcon(
":/icons/hide.svg"))) {
20 connect(
this, &QPushButton::clicked,
this,
21 &QPushButtonShowPassword::buttonClicked);
29void QPushButtonShowPassword::buttonClicked(
bool ) {
30 if (this->line->echoMode() == QLineEdit::Password) {
31 this->line->setEchoMode(QLineEdit::Normal);
32 setIcon(iconEditPushed);
34 this->line->setEchoMode(QLineEdit::Password);