PDA

View Full Version : qml qtwebkit svg mouse click



lamp
10th November 2011, 16:20
Hi
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 ?

lamp
11th November 2011, 07: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!!?

vinhvo
4th July 2012, 12:17
Hi,
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),

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