14 : QPushButton(parent),
15 iconEdit(QIcon::fromTheme(
"show", QIcon(
":/icons/view.svg"))),
16 iconEditPushed(QIcon::fromTheme(
"hide-new", QIcon(
":/icons/hide.svg"))) {
18 connect(
this, SIGNAL(
clicked(
bool)),
this, SLOT(buttonClicked(
bool)));
26void QPushButtonShowPassword::buttonClicked(
bool) {
27 if (this->line->echoMode() == QLineEdit::Password) {
28 this->line->setEchoMode(QLineEdit::Normal);
29 setIcon(iconEditPushed);
31 this->line->setEchoMode(QLineEdit::Password);