I’ve finally finished most of the development of my app, but I’m facing (i hope) one last problem: my python created database is never saved on the phone.
here you can see the database created by my other app SeaAiNetic in the .local/share folder. Bellow, the folder of my harbour-deepfish app is empty.
I added the QT += sql to my .pro file as mentioned here or here
and every time i make a change on my database i do con.commit() as it can be seen in my code here
I did not have this issue with my other app because i do not create the database with python but with QML instead.
So currently I can open the app and fill the database, but as soon as i close and then re-open the app, it’s like a new fresh installation. (perfect feature for data protection)
On the other side, when using QML Live from the SDK i never face this issue.
I think I’m missing something on the building files but I don’t know what, since, when comparing to other apps using python, we have the same configs.
Thank you anyone for your help or tips on this ! (yes you can build the app and use my API key i set hardcoded for testing)
No. You set the OrganizationName in the [X-Sailjail] section of the .desktop file. And you also set the ApplicationName there. Then you can create your database in .local/share/orgname/appname/. The Group definition in .yaml has nothing to do with it. Actually, it has nothing to do with anything and you should just remove it.
Unfortunately I don’t know how to adapt my python.calls from pyotherside, to “call” for functions inside a class, since the call function only takes functions.
Currently I call for each function inside the languagedownloader.py file whenever needed. But in your approach you use the MultiModalConfiguration class. If i understand correctly, your init_ function is there to handle the different system files throughout each OS. And then you call the self inside each other function so they know where the self.configuration_database is.
How could I have the same approach in my case ? For example, I set the same init_ function, set all my python code inside a class, some_var = MyClass(), but then how do I call for the functions from the qml files ?
And then call_sync executes the load() method from instance multimodal_configuration inside module configuration passing app.version as a single parameter.
Because it’s call_sync the call waits until the execution of the Python code is finished and saves the return values into settings but it would work the same with call just that there would be no blocking and thus no direct return value would be passed from Python to QML.
Thank you very much for the explanation. I tried to do it but I’m missing something because it’s not working. I will find a solution to implement it in the future.