QML + MYSQL
-
Hi,
The most simple would be to implement a REST service to do the communication. That way you are not dependent on the database you want to communicate with.
-
@SGaist Thank you. In this wiki "https://wiki.qt.io/QML_and_QSqlTableModel" which you send me before, the data sends from c++ to qml. And what about sending data from qml to c++, then from c++ insert data to MySQL database, is this could be a solution, if yes could you show the simple example or documentation?
Regards,
Jasur -
You have to implement the corresponding
setData
method in your model.Other than that, you have to build the MySQL plugin yourself using the MariaDB project as MySQL doesn't provide any support for Android.
-
@SGaist The solutions upper are complicated for me. I don't have such experience, to write plugins. I need fill a blank(form) on mobile(smartphone) then send the data to server. Is it possible in qml the filled blank(form) send to c++, and in c++ write this data in to the JSON or XML file, then send this file to a server with a specific port, on server side the desktop application will listen for specific port, if file comes , the desktop application will read the file and after all insert to MySQL database?
Regards ,
Jasur -
Then the REST service is what you are looking for. No need to pass files around.