remember the size of the main window

This commit is contained in:
Axel Kohlmeyer
2023-08-04 23:14:35 -04:00
parent 9b0fe3eeda
commit ea15cec4bf

View File

@ -191,6 +191,8 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) :
} else { } else {
setWindowTitle(QString("LAMMPS-GUI - *unknown*")); setWindowTitle(QString("LAMMPS-GUI - *unknown*"));
} }
resize(settings.value("mainx", 500).toInt(), settings.value("mainy", 320).toInt());
} }
LammpsGui::~LammpsGui() LammpsGui::~LammpsGui()
@ -330,6 +332,12 @@ void LammpsGui::quit()
break; break;
} }
} }
// store some global settings
QSettings settings;
settings.setValue("mainx", width());
settings.setValue("mainy", height());
settings.sync();
QCoreApplication::quit(); QCoreApplication::quit();
} }