Save text fields if program is closed

I have a 2 “Text area” fields in my project.
They are entered by the user as a setting.

But if program is closed values are not saved.

How to save these 2 fields when closing the program?
SIMPLE and NOT DIFFICULT without complex database.

I only need to save 2 fields.
Аnd I’ll be grateful to you for a working example.

I could not trace the closing of the application. To work with *.ini settings files, you need to use QSettings Class, but my attempts were also in vain.
https://en.spec-zone.ru/qt~5.14/qsettings
Just waiting for Michael.
Michael, can you make an *.ini file storage in the program?

Отследить закрытие приложения я не смог. Для работы с файлами настройки *.ini нужно использовать QSettings Class, но мои попытки так же были тщетны.
Остается ждать Майкла…
Майкл, может сделать в программе хранилище файлов ini?

1 Like

To save local data, you need to use a database. You can use a table with one field. It is important to mark the table as local so that the data is saved when the application is closed.

image

Here is the example local_variables.pma (30.1 KB)

Saving data is best tested in preview mode (F11).

1 Like

Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.