...
SettingForm::SettingForm(QWidget *parent
) :QDialog(parent
),ui
(new Ui
::SettingForm) {
ui->setupUi(this);
pEditPassEnable->setText("Click to change Password");
pEditPassEnable->setEnabled(true);
pEditPassEnable->setStyleSheet("Color:rgb(255, 255, 255);");
pEditPassEnable->setStyleSheet("background-color: rgb(206, 218, 214);");
pEditPassDisable
->setEchoMode
(QLineEdit::Normal);
pEditPassDisable->setText("Set Password");
pEditPassDisable->setEnabled(false);
pEditPassDisable->setStyleSheet("Color:rgb(128, 128, 128);");
pEditPassDisable->setStyleSheet("background-color: rgb(206, 218, 214);");
ui->PassgridLayout->addWidget(pEditPassEnable);
ui->PassgridLayout->addWidget(pEditPassDisable);
pEditPassEnable->hide();
pEditPassDisable->hide();
connect(ui->passwordRadiobutton,SIGNAL(toggled(bool)),this,SL OT(onCheckRadioButton(bool)));
}
bool SettingForm:nCheckRadioButton(bool checked)
{
if(checked)
{
pEditPassEnable->show();
pEditPassDisable->hide();
}
else if(!checked)
{
pEditPassEnable->hide();
pEditPassDisable->show();
}
return true;
}
...
SettingForm::SettingForm(QWidget *parent) :QDialog(parent),ui(new Ui::SettingForm)
{
ui->setupUi(this);
pEditPassEnable=new QLineEdit(this);
pEditPassDisable=new QLineEdit(this);
pEditPassEnable->setText("Click to change Password");
pEditPassEnable->setEnabled(true);
pEditPassEnable->setStyleSheet("Color:rgb(255, 255, 255);");
pEditPassEnable->setStyleSheet("background-color: rgb(206, 218, 214);");
pEditPassDisable->setEchoMode(QLineEdit::Normal);
pEditPassDisable->setText("Set Password");
pEditPassDisable->setEnabled(false);
pEditPassDisable->setStyleSheet("Color:rgb(128, 128, 128);");
pEditPassDisable->setStyleSheet("background-color: rgb(206, 218, 214);");
ui->PassgridLayout->addWidget(pEditPassEnable);
ui->PassgridLayout->addWidget(pEditPassDisable);
pEditPassEnable->hide();
pEditPassDisable->hide();
connect(ui->passwordRadiobutton,SIGNAL(toggled(bool)),this,SL OT(onCheckRadioButton(bool)));
}
bool SettingForm:nCheckRadioButton(bool checked)
{
if(checked)
{
pEditPassEnable->show();
pEditPassDisable->hide();
}
else if(!checked)
{
pEditPassEnable->hide();
pEditPassDisable->show();
}
return true;
}
To copy to clipboard, switch view to plain text mode
Bookmarks