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. Qt widgets mixed with JavaScript components - is this possible? How?
QtWS25 Last Chance

Qt widgets mixed with JavaScript components - is this possible? How?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.1k 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.
  • F Offline
    F Offline
    FranzB
    wrote on last edited by
    #1

    Hallo,

    I would like to further develop an already existing application dealing with 3D scans. The existing version has a QML UI with the usual slot-signal-mechanism to interact with the 3D visualization widgets. Now, the new version should rely on a set of Javascript components (based on Bootstrap) in order to reuse existing code. However, the application should also still include a GL Widget (interacting with a scanner) and another such widget .(interacting with a 3D Library and visualization). The user should be able to control the widgets as well as the rest of the UI with the JavaScript components. How would I go about that?

    I have done some online research and cannot find anything in that regard. Coming closest was the remark in a 2013 book which states that QML does not support DOM manipulation or any feedback interaction. However, if I scrap the QML part and opt for a website approach for the whole UI, how would I include those widgets?

    It's quite important for me to be able to reuse those JavaScript components because otherwise I would be forced to implement their looks and behavior from scratch in QML and maybe at a later stage always update them accordingly when the JS components are updated. If it is not possible to mix those two, I would have to do it, but for the reason of reusability and especially maintainability I hope for a viable solution.

    Kind regards,
    Franz

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pmh4514
      wrote on last edited by
      #2

      Perhaps use the QtWebkitBridge and an embedded QWebView to hold your JavaScript/HTML GUI components? The seamless back and forth between the Qt and embedded DOM is quite nice

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maximus
        wrote on last edited by
        #3

        Have a look at this:
        "http://qt-project.org/doc/qt-4.8/qtwebkit-bridge.html":http://qt-project.org/doc/qt-4.8/qtwebkit-bridge.html

        But beware, Qt is bringing a whole new shinny browser in 5.4 that will use the module QWebEngine, so you may what to check this also before coding too much with QWebKit that will get replaced by QWebEngine.

        Good luck


        Free Indoor Cycling Software - https://maximumtrainer.com

        1 Reply Last reply
        0
        • F Offline
          F Offline
          FranzB
          wrote on last edited by
          #4

          Thanks a lot, exactly what I was looking for!

          1 Reply Last reply
          0

          • Login

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