View Full Version : qml qtwebkit svg mouse click

10th November 2011, 15:20
I am creating qml simple webview and use svg button in my web page but "mouse click" not work (mouseover event is working).
how to resolve this problem ?

11th November 2011, 06:55
sample code with chart demo (HTML5 jquery SVG):

import QtQuick 1.0
import QtWebKit 1.0

Rectangle {
width: 1270
height: 768
color: "#d92f2f"
WebView {
id : webView
settings.pluginsEnabled: true
url: "http://www.highcharts.com/stock/demo/"
preferredWidth: 1270
preferredHeight: 768
scale: 1
smooth: false

zoom button not work!!?

4th July 2012, 11:17
Just figure out, might be useful for someone. We need to change the source of highchart.js(or highchart.src.js, whatever we are using)
Basically, highchart thinks that QTwebkit is touch-enabled:).

// Vinh Vo : Fix to work with Qwebkit. Original : doc.documentElement.ontouchstart !== UNDEFINED
hasTouch = (doc.documentElement.ontouchstart !== UNDEFINED&& doc.documentElement.ontouchstart!=null),

30th August 2012, 15:52
great! i also had this problem using highcharts and qwebkit and your hint solved it! thanx a lot!