I don't see why it won't work,
Could i have put it in the wrong place ?
import QtQuick 1.1
import Qt 4.7
import QtWebKit 1.0
import com.nokia.symbian 1.0
Rectangle
{
id:mainRect
height: parent.height
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
anchors.top:parent.top
anchors.bottom: parent.bottom
Item {
id: textItem
height: 82
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
anchors.top:parent.top
TextField {
id: myTextField;
y:15
width: parent.width -70
text: "Enter your url here"
errorHighlight: true
anchors.left: parent.left
}
Button {
id: button
y:15
anchors.right: parent.right
text: "Go"
onClicked: {
webViewRect.reset(myTextField.text);
}
}
}
Item {
id:webViewRect
signal finished(string url)
signal loadFailed()
function reset(aUrl) {
webView.url =aUrl;
}
anchors.top:textItem.bottom
width: 360
height: 300
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
Flickable {
id:webViewFlickr
anchors.fill: parent
width: parent.width
height: parent.height
contentWidth: Math.max(parent.width,360)
contentHeight: Math.max(parent.height,640)
pressDelay: 200
WebView {
id: webView
anchors.fill: parent
preferredHeight: height
preferredWidth: Math.max(parent.width,1000)
url: "main.html";
}
}
}
}