UI: Toggle password "Show" button text when clicked

This commit is contained in:
Palana
2015-07-06 13:38:57 +02:00
parent 8ae0cd2492
commit 99db4d7577
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -214,6 +214,10 @@ QWidget *OBSPropertiesView::AddText(obs_property_t *prop, QFormLayout *layout,
WidgetInfo *info = new WidgetInfo(this, prop, edit);
connect(show, &QAbstractButton::toggled,
info, &WidgetInfo::TogglePasswordText);
connect(show, &QAbstractButton::toggled, [=](bool hide)
{
show->setText(hide ? QTStr("Hide") : QTStr("Show"));
});
children.emplace_back(info);
label = new QLabel(QT_UTF8(obs_property_description(prop)));