Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Building an API for QJSEngine.



  • I need to extend my application with javascript, so the users can write scripts and run with my application, but I don't know how to make it.

    I need an complete set of classes, functions and properties, so a program like this below print "Hello" to qDebug(), show an alert window saying "World" and play a guitar sound.

    @console.log("Hello");
    alert("World");
    var s = new Sound(LOCATION + "/res/guitar.wav");
    s.play();@

    An example or tutorial would be great, because I don't know how to make this and I'm only starting with Qt, so please, be kind with me.


Log in to reply