calling C++ function from QML
I want to call function "writeintocsvFile()" to write/append data into CSV file from QML. Would be nice if someone guide me how i can do this??
Easiest for you would be the way via adding a property to QML context: http://doc.qt.io/qt-5/qtqml-cppintegration-contextproperties.html
Later, probably, you would like to do it via registering a new type.
But basically both ways require you to have a C++ "backend" class which should be "registered" in desired QML file for you to have an ability to call methods of this class.