What is class for saving prefernces in Qt apart fromQSettings
-
What is class for saving preferences in Qt apart from QSettings.i.e I could not find any class called Qpref
-
What is class for saving preferences in Qt apart from QSettings.i.e I could not find any class called Qpref
@Qt-Enthusiast Hi, friend. Welcome.
Just use
QSettings
is Ok. if you want to store these value of setting fromQSetting
in member. you could create one class or data struct. It is Ok. -
What is class for saving preferences in Qt apart from QSettings.i.e I could not find any class called Qpref
@Qt-Enthusiast What exactly is missing from QSettings for you?
-
I am looking for a class in Qt where I can save and restore the preferences of GUI like window sizes and windows layout once I exit the tool and restart the tool
-
What is class for saving preferences in Qt apart from QSettings.i.e I could not find any class called Qpref
@Qt-Enthusiast do you try to use QSettings with IOS or Android? QSettings is designed for Lunix, MacOS and Windows.
For Mobile devices you'll have to do some manual, As in set it to save as file, and specify a path that you app is allowed to use.Other than that, it should work fine.
-
is there any class called QPreferences or Qpref
-
I am looking for a class in Qt where I can save and restore the preferences of GUI like window sizes and windows layout once I exit the tool and restart the tool
@Qt-Enthusiast
It's perfectly fine to useQSettings
to save window geometry.
Look atQWidget::saveGeometry()
andQMainWindow::saveState()
void MyWidget::closeEvent(QCloseEvent *event) { QSettings settings("MyCompany", "MyApp"); settings.setValue("geometry", saveGeometry()); QWidget::closeEvent(event); }