Is there a way that Qt could save UI settings automatically , without calling QSettings::setValue () ?
e.g In a QMainWindow , save the font size of QMenu automatically
Thanks !
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.
QMainWindow has functions saveState and restoreState and also derives from QWidget save and restore geometry. However as documentation here states only settings that you will be able to restore are just that: a mainwindow state and geometry. It seems unavoidable that you will have implement storage of settings for individual widgets. In the link above Qt guys give a good snippet on how to accomplish this in mainwindow derivatives.