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?
Forum Updated to NodeBB v4.3 + New Features

How to include QScriptEngine?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.4k 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.
  • K Offline
    K Offline
    kitfox
    wrote on 4 Nov 2018, 11:13 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
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 4 Nov 2018, 11:15 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 4 Nov 2018, 11:20 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?

        M 1 Reply Last reply 4 Nov 2018, 11:24
        0
        • K kitfox
          4 Nov 2018, 11:20

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

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 4 Nov 2018, 11:24 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

          1/4

          4 Nov 2018, 11:13

          • Login

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