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. How to include QScriptEngine?

How to include QScriptEngine?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.4k Views
  • 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.
  • K Offline
    K Offline
    kitfox
    wrote on last edited by
    #1

    I'm having trouble trying to add the QScript module to a project I've created in QtCreator. I've added the script module to my .pro file:

    QT += script xml

    However, this gives me the error Project ERROR: Unknown module(s) in QT: script.

    Including any classes from this module is also causing a file not found error:

    #include <QScriptEngine>

    How do I set up my project to be able to use the JavaScript module?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Its a separate module so needs to be selected to be installed

      alt text

      1 Reply Last reply
      2
      • K Offline
        K Offline
        kitfox
        wrote on last edited by
        #3

        Thanks. Would you know why it's deprecated? It seems pretty useful to me. Is there a more up to date replacement for it?

        mrjjM 1 Reply Last reply
        0
        • K kitfox

          Thanks. Would you know why it's deprecated? It seems pretty useful to me. Is there a more up to date replacement for it?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @kitfox
          Its old and due to changes in used tech,
          it was a burden to make it use new versions of that tech.

          The replacement is
          http://doc.qt.io/qt-5/qjsengine.html

          But its not a 1 to 1 replacement.

          1 Reply Last reply
          2

          • Login

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