wilson
18th October 2011, 01:50
Hi,
I have a question about WebView element.
I create a HTML file named "hfile.htm", and I use a WebView with the url property is "hfile.htm".
Now my main.qml is like:
import QtQuick 1.0
import QtWebKit 1.0
Rectangle {
width: 600
height: 400
WebView { id: webMap
anchors.fill: parent
url: "hfile.htm"
}
Rectangle { id: rec1
width: 100
height: 100
color: "red"
}
}
Can I change the color property of Rectangle rec1 from javascript in hfile.htm??
I have a question about WebView element.
I create a HTML file named "hfile.htm", and I use a WebView with the url property is "hfile.htm".
Now my main.qml is like:
import QtQuick 1.0
import QtWebKit 1.0
Rectangle {
width: 600
height: 400
WebView { id: webMap
anchors.fill: parent
url: "hfile.htm"
}
Rectangle { id: rec1
width: 100
height: 100
color: "red"
}
}
Can I change the color property of Rectangle rec1 from javascript in hfile.htm??