Created
November 20, 2016 18:54
-
-
Save penk/d3fa436ef3dd13fd4cf0b84f4af40c73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import QtWebKit 3.0 | |
import QtQuick.Window 2.2 | |
// DISPLAY=:0.0 qmlscene webview.qml | |
Window { | |
width: Screen.width | |
height: Screen.height | |
TextInput { | |
id: bar | |
anchors.bottom: parent.bottom | |
//text: 'http://events.miappi.com/lonelyplanet?reset=1' | |
text: 'http://google.com/ncr' | |
onAccepted: { | |
webview.url = text | |
} | |
} | |
WebView { | |
id: webview | |
anchors { | |
left: parent.left | |
right: parent.right | |
top: parent.top | |
bottom: bar.top | |
} | |
onLoadingChanged: { | |
if (loadRequest.status == WebView.LoadSucceededStatus) | |
bar.text = webview.url | |
} | |
url: bar.text | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment