1. Check the code details here :
They have given clear instructions on how to create/insert values etc.
I couldn't figure out how to keep a single row updated and instead I was inserting new row every time user saved his settings. What I wanted to do each time user pressed save settings just update that first row.
I will write a rough algorithm :
If you create the table at the installation time itself and insert rows in the table later :
if ( NUMBER_OF_ROWS_IN_TABLE == 0 )
Execute Insertion Query. // (To be used when your app runs for the first time)
else
Execute Updation Query. // (To be used afterwards)
or
If you create the table at the time you are storing the data:
if ( TABLE_EXIST == false )
Execute Create table Query. // (To be used when your app runs for the first time)
Execute Insertion Query. // (To be used when your app runs for the first time)
else
Execute Updation Query. // (To be used afterwards)
2. You could possibly use a combination of qml and C++ as well as your data set is not too large . You can use C++ in doing some file handling (preferable encrypt the data), and then use qml to do the necessary save and retrieve operations as required.