Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QML Design, required C++ logic?
baer999 last edited by
Is it possible to make all logic in QML or do I have restrictions against C++ code?
I want to make a alarm buzzer for my Raspberry Pi - for this I need some logic in setting up an alarm (cron job), set different MP3 files for playing and do some other stuff (sleep, etc.).
My question that makes me crazy right now is:
Can I do all in QML (Design and Logic) or do I have to use C++ additionally?
If C++ is needed is there a tutorial how to bind C++ method slots to QML signals?
I dont' think you'll manage to set up a cron job from within QML, but other tasks are doable there easily.
Here is a part of the documentation for connecting C++ and QML: "link":http://qt-project.org/doc/qt-5/qtqml-cppintegration-topic.html.
dasRicardo last edited by
belab last edited by
You might wrap you qml app into a shell script. Pipe the input of a crontab file to your app and pipe the output back to the crontab file and call crontab, e.g.:
cat MyCrontab.txt | xargs myQmlAlaramApp > MyCrontab.txt
Inside qml access the argument string via: