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. [Cosed/Duplicate] QtWebView + D3 Javascript Visualization Library

[Cosed/Duplicate] QtWebView + D3 Javascript Visualization Library

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 3.5k 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.
  • Q Offline
    Q Offline
    quantumavatar
    wrote on last edited by
    #1

    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
    0
    • Q Offline
      Q Offline
      quantumavatar
      wrote on last edited by
      #2

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

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

        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
        0

        • Login

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