Important: Please read the Qt Code of Conduct -

[Cosed/Duplicate] QtWebView + D3 Javascript Visualization Library

  • Hi all,

    So "D3": 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.

    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!

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

  • Moderators

    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.

Log in to reply