How to save CheckBox state
Solved
General and Desktop
-
Hello.
I want to save and load the checkbox state but I cant do it.//I saving it as : stream << ui->Task1->isChecked() <<"\n"; //and i tried this to load ui->Task1->setChecked(ui->Task1->isChecked()) = line11;
but of course, it's not working because the expression is not assignable. I don't know how I can load it to my program. Can you help me maybe?
-
@naax said in How to save CheckBox state:
line11
What is this? You need to read from the stream, convert to a boolean and then set it using ui->Task1->setChecked(...)
Also you should check https://doc.qt.io/qt-5/qsettings.html