summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorArvid Nilsson <anilsson@blackberry.com>2013-10-02 16:58:25 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-04 12:22:53 +0200
commitf7842507b94bd21ce2ed3d4f0d34e8cd83a1731a (patch)
tree812aebc21ce476667ad94b46a9e5bd433cd86f4c /examples
parentef6cb53a1d49de616067126c8f49d2406c9a7f43 (diff)
Add loadProgress API
This exposes loadProgress in both widget and quick webengineviews. However, the progress will not change until we get an upstream change in Chromium where the content LoadProgressChanged API is exposed to all ports, not just Android. The upstream change is https://src.chromium.org/viewvc/chrome?revision=221010&view=revision Once we get that change, you'll see the widget example browser start to paint a blue progress rectangle in the background of the URL bar. Also, a progress bar was added to the quicknanobrowser, but it will be stuck at 0 for now. Change-Id: Icbaa01b86c013e0052b3abb7672c38e57128f44a Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/quicknanobrowser/quickwindow.qml60
1 files changed, 34 insertions, 26 deletions
diff --git a/examples/quick/quicknanobrowser/quickwindow.qml b/examples/quick/quicknanobrowser/quickwindow.qml
index 7ec4fc021..a3b8c405d 100644
--- a/examples/quick/quicknanobrowser/quickwindow.qml
+++ b/examples/quick/quicknanobrowser/quickwindow.qml
@@ -62,36 +62,43 @@ ApplicationWindow {
toolBar: ToolBar {
id: navigationBar
- RowLayout {
+ ColumnLayout {
anchors.fill: parent
+ RowLayout {
+ ToolButton {
+ id: backButton
+ iconSource: "icons/go-previous.png"
+ onClicked: webEngineView.goBack()
+ enabled: webEngineView.canGoBack
+ }
+ ToolButton {
+ id: forwardButton
+ iconSource: "icons/go-next.png"
+ onClicked: webEngineView.goForward()
+ enabled: webEngineView.canGoForward
+ }
+ ToolButton {
+ id: reloadButton
+ iconSource: webEngineView.loading ? "icons/process-stop.png" : "icons/view-refresh.png"
+ onClicked: webEngineView.reload()
+ }
+ Image {
+ id: faviconImage
+ width: 16; height: 16
+ }
+ TextField {
+ id: addressBar
+ focus: true
+ Layout.fillWidth: true
- ToolButton {
- id: backButton
- iconSource: "icons/go-previous.png"
- onClicked: webEngineView.goBack()
- enabled: webEngineView.canGoBack
+ onAccepted: webEngineView.url = utils.fromUserInput(text)
+ }
}
- ToolButton {
- id: forwardButton
- iconSource: "icons/go-next.png"
- onClicked: webEngineView.goForward()
- enabled: webEngineView.canGoForward
- }
- ToolButton {
- id: reloadButton
- iconSource: webEngineView.loading ? "icons/process-stop.png" : "icons/view-refresh.png"
- onClicked: webEngineView.reload()
- }
- Image {
- id: faviconImage
- width: 16; height: 16
- }
- TextField {
- id: addressBar
- focus: true
+ ProgressBar {
Layout.fillWidth: true
-
- onAccepted: webEngineView.url = utils.fromUserInput(text)
+ id: progressBar
+ minimumValue: 0
+ maximumValue: 100
}
}
}
@@ -104,5 +111,6 @@ ApplicationWindow {
onUrlChanged: addressBar.text = url
onIconChanged: faviconImage.source = url
+ onLoadProgressChanged: progressBar.value = loadProgress
}
}