diff options
author | Tapani Mikola <tapani.mikola@nokia.com> | 2009-08-12 14:43:53 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-08-13 05:23:25 (GMT) |
commit | 7c171e8067c929a3f49cf9753e75e202744e7344 (patch) | |
tree | 0f9b309d7ca8e4c44e6bc41dfd47975199b0aa12 /demos/declarative/webbrowser/webbrowser.qml | |
parent | 19c25e46e47cc181fb8a633471a528d78e7d85a6 (diff) | |
download | Qt-7c171e8067c929a3f49cf9753e75e202744e7344.zip Qt-7c171e8067c929a3f49cf9753e75e202744e7344.tar.gz Qt-7c171e8067c929a3f49cf9753e75e202744e7344.tar.bz2 |
Small cleanup to webbrowser.qml not to use url as property id. Using urlString instead. In addition title back to show the page title.
Diffstat (limited to 'demos/declarative/webbrowser/webbrowser.qml')
-rw-r--r-- | demos/declarative/webbrowser/webbrowser.qml | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index e501e12..9b6d6f6 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -6,10 +6,8 @@ import "fieldtext" Item { id: WebBrowser - property string url : "http://www.qtsoftware.com/" + property string urlString : "http://www.qtsoftware.com/" - width: 640 - height: 480 state: "Normal" Script { @@ -78,8 +76,8 @@ Item { Text { id: HeaderText - //text: MyWebView.title!='' || MyWebView.progress == 1.0 ? MyWebView.title : 'Loading...' - text: MyWebView.url + text: MyWebView.title!='' || MyWebView.progress == 1.0 ? MyWebView.title : 'Loading...' + //text: MyWebView.url elide: "ElideRight" color: "white" @@ -140,9 +138,9 @@ Item { color: "#555555" focusOnPress: true =======*/ - text: WebBrowser.url + text: WebBrowser.urlString label: "url:" - onConfirmed: { print ('OnConfirmed: '+EditUrl.text); WebBrowser.url = EditUrl.text; print (EditUrl.text); MyWebView.focus=true } + onConfirmed: { print ('OnConfirmed: '+EditUrl.text); WebBrowser.urlString = EditUrl.text; print (EditUrl.text); MyWebView.focus=true } onCancelled: { MyWebView.focus=true } onStartEdit: { print (EditUrl.text); MyWebView.focus=false } @@ -197,16 +195,17 @@ Item { id: MyWebView cacheSize: 4000000 - url: WebBrowser.url + url: WebBrowser.urlString smooth: !Flick.moving fillColor: "white" focus: true + interactive: true idealWidth: Flick.width idealHeight: Flick.height/scale scale: (width > 0) ? Flick.width/width*zoomedOut+(1-zoomedOut) : 1 - onUrlChanged: { print ('OnUrlChanged: '+url); WebBrowser.url = url.toString(); print ('Moved to url: ' + WebBrowser.url) } + onUrlChanged: { print ('OnUrlChanged: '+url.toString()); WebBrowser.urlString = url.toString(); print ('Moved to url: ' + WebBrowser.urlString) } onDoubleClick: { toggleZoom() } property real zoomedOut : 1 |