I am using qtcreator locking for a way to save my data if i restart my app it continue from last value not restart to 0 its only part of the code
void Form::on_pushButton_clicked()
{
counter++;
}
I am using qtcreator locking for a way to save my data if i restart my app it continue from last value not restart to 0 its only part of the code
void Form::on_pushButton_clicked()
{
counter++;
}
You can either save it to a file of your choice: Writing Integers to a .txt file in c++
Or you can use Qt Settings file: https://doc.qt.io/qt-5/qsettings.html
Or if you start to have more information and you also what to save relationships between your data, you can start looking at Databases. A simple and local DBMS is Sqlite: https://www.sqlite.org/index.html