Qt World Summit: Submit your Presentation

JS API: console not defined

  • Hi All,
    I'm adding simple scripting capabilities to my c++ app through the JS API as suggested here as second approach: http://doc.qt.io/qt-5/topics-scripting.html (which means, no qml/qtQuick).

    I've tried the basic example described here: http://doc.qt.io/qt-5/qjsengine.html#details
    and everythins works fine, but when I try to use console.log() from the script I get the following error: "ReferenceError: console is not defined"

    1. How am I supposed to add the console support to the scripting env?
    2. In general should I refer to the QML doc to use learn what's available in the JS API? Or where else?

    Thank you,

Log in to reply