Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. JS API: console not defined
Forum Update on Tuesday, May 27th 2025

JS API: console not defined

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 441 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rickyviking
    wrote on 16 May 2015, 17:31 last edited by
    #1

    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,
    Ricky

    1 Reply Last reply
    0

    1/1

    16 May 2015, 17:31

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved