summaryrefslogtreecommitdiffstats
path: root/examples/webengine/quicknanobrowser
diff options
context:
space:
mode:
Diffstat (limited to 'examples/webengine/quicknanobrowser')
-rw-r--r--examples/webengine/quicknanobrowser/quickwindow.qml12
-rw-r--r--examples/webengine/quicknanobrowser/util.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/examples/webengine/quicknanobrowser/quickwindow.qml b/examples/webengine/quicknanobrowser/quickwindow.qml
index 610144dca..b954629fb 100644
--- a/examples/webengine/quicknanobrowser/quickwindow.qml
+++ b/examples/webengine/quicknanobrowser/quickwindow.qml
@@ -93,6 +93,18 @@ ApplicationWindow {
tabs.removeTab(tabs.currentIndex)
}
}
+ Action {
+ shortcut: "Ctrl+0"
+ onTriggered: currentWebView.zoomFactor = 1.0;
+ }
+ Action {
+ shortcut: "Ctrl+-"
+ onTriggered: currentWebView.zoomFactor -= 0.1;
+ }
+ Action {
+ shortcut: "Ctrl+="
+ onTriggered: currentWebView.zoomFactor += 0.1;
+ }
toolBar: ToolBar {
id: navigationBar
diff --git a/examples/webengine/quicknanobrowser/util.h b/examples/webengine/quicknanobrowser/util.h
index bc1cf8beb..ca0f5f1d5 100644
--- a/examples/webengine/quicknanobrowser/util.h
+++ b/examples/webengine/quicknanobrowser/util.h
@@ -50,7 +50,7 @@ QUrl urlFromUserInput(const QString& userInput)
{
QFileInfo fileInfo(userInput);
if (fileInfo.exists())
- return QUrl(fileInfo.absoluteFilePath());
+ return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
return QUrl::fromUserInput(userInput);
}