I want to write an app for Ubuntu Touch based on the QtQuick2ApplicationViewer template and the app needs to write to a file (e.g. '/tmp/test.log').
I tested with using a function/macro Q_INVOKABLE:
Q_INVOKABLE void QtQuick2ApplicationViewer::setData3(void) {
qDebug() << "setData";
}
...and share it by Q_INVOKABLE.
But I can not call the function in my .qml, and I got an error:
...main.qml:289: ReferenceError: setData3 "is not defined"
Has anyone got a working demo.pro file to download?
Or a working method to create a file using a cpp-function+qml as .pro to download?
Working in the qtcreator-version for ubuntutouch?