Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Use external javascript libraries in my qml canvas.
QtWS25 Last Chance

Use external javascript libraries in my qml canvas.

Scheduled Pinned Locked Moved QML and Qt Quick
qmlcanvasjavascript
4 Posts 3 Posters 2.3k 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.
  • E Offline
    E Offline
    ealione
    wrote on 22 Jun 2015, 13:29 last edited by
    #1

    Now and then I find some nice javascript libraries like this one.

    Since the qml canvas is so similar to the html canvas then it should be possible to use them in qml.

    Is there any tutorial, example, or other recourse that discusses this matter?

    P 1 Reply Last reply 23 Jun 2015, 05:58
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 Jun 2015, 21:46 last edited by
      #2

      Hi,

      Is QtQml JavaScript imports what you are looking for ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • E ealione
        22 Jun 2015, 13:29

        Now and then I find some nice javascript libraries like this one.

        Since the qml canvas is so similar to the html canvas then it should be possible to use them in qml.

        Is there any tutorial, example, or other recourse that discusses this matter?

        P Offline
        P Offline
        p3c0
        Moderators
        wrote on 23 Jun 2015, 05:58 last edited by p3c0
        #3

        @ealione I doubt that it will work readily with QML. Javascript support in QML is very restricted as compared to that of Web-Browsers. It lacks of certain objects which are mostly used in these web-browsers supported Javascripts.
        You can find more info here:

        • http://doc.qt.io/qt-5/qtqml-javascript-hostenvironment.html
        • http://doc.qt.io/qt-5/qtqml-javascript-expressions.html
        • http://doc.qt.io/qt-5/qtqml-javascript-hostenvironment.html#javascript-environment-restrictions

        157

        1 Reply Last reply
        1
        • E Offline
          E Offline
          ealione
          wrote on 23 Jun 2015, 06:54 last edited by
          #4

          Hi SGaist,
          I did of curse know about importing and using simple javascript code in my qml tests. But what I was wondering was if it is possible to use the multitude of javascript libraries that are out there, mostly the impressive ones that deal with animations like the one I linked to.

          Thanks for the links p3c0, I believe that by studying them I may be able to port a javascript library to a qml compatible version.

          1 Reply Last reply
          0

          3/4

          23 Jun 2015, 05:58

          • Login

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