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. How to make Autobahn-JS work in QML ?
Forum Updated to NodeBB v4.3 + New Features

How to make Autobahn-JS work in QML ?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
autobahnwampqmljavascript qml
4 Posts 2 Posters 1.9k Views 3 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.
  • V Offline
    V Offline
    vishnu
    wrote on 17 Mar 2017, 09:12 last edited by
    #1

    Hello All,

    we want to use WAMP protocol to my server client applications. I have found Autobahn-js which implements The Web Application Messaging Protocol (WAMP) .
    we would like to use QML for designing the frontend (thin client) and target Android, IOS, Windows Mobile and desktop platforms. Since Autobahn-js written in Javascript, I thought it would work. but unfortunately it didn't.

    Here is the following I did :

    1. I have downloaded the Autobahn Js library from Github.

    2. I have included all the files in my QML project.

    3. import "lib/autobahn.js" as AutoBhan

    4. Then comes the error qrc:/lib/autobahn.js:15: ReferenceError: require is not defined

    upon googling i came to know that "The require() function is a core function of node.js which is part of the engine. It's not something language-specific just like the window object in browser-based Javascript is not something in the Javascript language. node.js actually is: a server-side JavaScript engine, which executes JavaScript files**. It is not a framework which you could load into another engine like QT**". source.

    Here is my question:

    1. How can I make Autobahn Js library avaiable in qml ? which is actually making node.js functions running in qml.

    2. Tough there is C++ implementation, I am not convinced in using the C++ wrapper in qml because it depends on third parties like Boost.

    3. Is is possible to make JS library which depends on node.js functions in QML ? Please let me know. Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 17 Mar 2017, 23:11 last edited by
      #2

      Hi,

      Are you looking for something like Quickly ?

      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
      1
      • V Offline
        V Offline
        vishnu
        wrote on 20 Mar 2017, 09:07 last edited by vishnu
        #3

        @SGaist Actually No. I don't want to involve in Node.js, if it depends on so many third parties. So I thought of working with browser version .Want i did is,

        • I have downloaded the Authobahn.js file.

        • Included the Authobahn.js file in my QML project.

        • import "browserversion/autobahn.js" as AutoBhan

        • When i build it, then comes the error Unimplemented code.
          ASSERT: "idom == referenceIdom" in file compiler\qv4ssa.cpp, line 4959

          error
          any clue? where am I getting it wrong? Thanks

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 20 Mar 2017, 21:43 last edited by
          #4

          Sorry, I haven't worked on the internals of V4 so I can't really comment on that error.

          Maybe QTBUG-50387 and related might shed some light.

          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

          3/4

          20 Mar 2017, 09:07

          • 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