Hello I am trying to load my .ini settings back into my UI.
I have the basic form down, from what I read in the QSettings doc and from what I could gather across the web, but I am still failing to understand how to load user saved text back into the UI.
Code:
void DLP3Dprinter::saveprogram() { settings.beginGroup("MainWindow"); settings.setValue("size", size()); settings.setValue("pos", pos()); settings.setValue("Resolution",ui->StepResolutionText->toPlainText()); settings.endGroup(); } void DLP3Dprinter::readsettings() { settings.beginGroup("MainWindow"); //settings.setUserData("Resolution",ui->StepResolutionText->toPlainText()); //ui->StepResolutionText->setPlainText(QApplication::translate("DLP3Dprinter"," ?????",0)); // ui->StepResolutionText->setPlainText(settings.value("Resolution")); settings.endGroup();
I am trying various methods to attain my desired result, but my programming knowledge is limited. Any help would be appreciated. I am sure this is pretty simple, once understood.
Thanks!