if I have a dialog box with some checkboxes, some ratiobuttons etc, and I select some of them after I close this dialog and open it again all checkboxes are unchecked. What is the best way to store the state of this dialog box?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to keep the state while the app is running – simply keep the dialog around and show/hide it as necessary.
If you need to keep state for next time the app is run then you need to store the individual settings separately (see QSettings) – this makes sense if say an update of your app add new settings.