Is there some sort of standard or commonly-used way to store data in elementary apps? I currently have a bunch of GObjects contained in a ListModel and would like to persist that to the disk and reload it when the app opens again. The Settings object doesn't seem like quite the right place for it as it's an unbounded chunk of text data from user input. Should I just stuff it in a leveldb instance or something? Or is there a better option?

1 Answer 1


I used a json array to save some data for an application I'm building. The data is saved in a file in the user's .config folder. Take a look at the writeServers method.

If you go over the entire file, you'll see that it first verifies that the file exists, and creates it if it does not.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.