PDA

View Full Version : button and lineEdit reinstall in stackedWidget



seniorc
6th May 2014, 22:13
Hello i have button(not enable) and lineEdit in stackedWidget page.After work stackedwidget page(button is enable now) , How can i clear lineEdit and button is not enable.I mean how can i reinstall page initial setting.

ChrisW67
7th May 2014, 04:46
Execute:


ui->lineEdit->clear();
ui->pushButton->setEnabled(false);

Or did I miss the point of your question altogether?

seniorc
7th May 2014, 07:26
This is a way for One lineEdit and button. But if have 3 lineEdits , 2 button and 3 comboBox(set initial index) , any easy way?

ChrisW67
7th May 2014, 07:53
You are looking for an easier way than 8 straightforward function calls?

seniorc
7th May 2014, 09:48
Im looking some widgets return initial setting runtime

anda_skoa
7th May 2014, 10:46
You can of course save all properties of all widgets at start time and then apply them again for reset.

Probably below 100 lines of code.

Explicitly setting the target state as suggested by ChrisW67 would be easier, but of course your choice.

Cheers,
_

seniorc
7th May 2014, 11:09
Thanks for all helping