[Interest] Problem displaying some google charts with QWebView

bar tomas bartomas at gmail.com
Mon Nov 5 16:11:19 CET 2012


Hi,

I'm displaying html pages containing interactive Google charts in a
QWebView. All google charts work fine except for Table. A Table does
simply not display.
For instance do you know why the following HTML page (it is the demo
for table charts available on the Google charts website:
http://code.google.com/apis/ajax/playground/#table) does not display
on a QWebView (while all the other charts do)? I've tried tweaking the
QWebSettings to no avail.
Many thanks.

######### HTML DOCUMENT NOT DISPLAYING IN QWEBVIEW#########

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>
      Google Visualization API Sample
    </title>
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">
      google.load('visualization', '1', {packages: ['table']});
    </script>
    <script type="text/javascript">
    function drawVisualization() {
      // Create and populate the data table.
      var data = google.visualization.arrayToDataTable([
        ['Name', 'Height', 'Smokes'],
        ['Tong Ning mu', 174, true],
        ['Huang Ang fa', 523, false],
        ['Teng nu', 86, true]
      ]);

      // Create and draw the visualization.
      visualization = new
google.visualization.Table(document.getElementById('table'));
      visualization.draw(data, null);
    }


    google.setOnLoadCallback(drawVisualization);
    </script>
  </head>
  <body style="font-family: Arial;border: 0 none;">
    <div id="table"></div>
  </body>
</html>



More information about the Interest mailing list