Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [Cosed/Duplicate] QtWebView + D3 Javascript Visualization Library

    QML and Qt Quick
    2
    3
    3265
    Loading More Posts
    • 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.
    • Q
      quantumavatar last edited by

      Hi all,

      So "D3":https://github.com/mbostock/d3/wiki/Gallery is a visualization library written in javascript for data visualizations on the web.

      The goal is to try and expand qml's repertoire by allowing access to D3 via WebKit.

      I can display a D3 graph (local html file) in a QtWebView via qml very simply.

      @
      WebView
      {
      url: "../../d3/scatter/index.html"
      preferredWidth: window.height
      preferredHeight: window.width
      smooth: true
      }
      @

      On the D3 side we have a few files:
      @
      index.html // Basically just calls the d3 javascript
      d3code.js // Javascript code
      d3.v3.js // The D3 library
      @

      The question is how do i communicate with the d3code.js file from qml/qt or is it not possible because it will be in its own thread running in the webview. I suppose the hackish way is to share a file the two would use to share data and make a lock of some sort.

      Thanks guys and Long live Qt!

      1 Reply Last reply Reply Quote 0
      • Q
        quantumavatar last edited by

        Just realized i should have posted this in Qt WebKit. Will move it there.

        1 Reply Last reply Reply Quote 0
        • M
          mlong last edited by

          Since it's already been reposted there, I'll close this thread.

          So you'll know next time, quantumavatar, a moderator can move thread for you if need be.

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post