summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/visual/webview/zooming/zooming.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/visual/webview/zooming/zooming.qml')
-rw-r--r--tests/auto/declarative/visual/webview/zooming/zooming.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/declarative/visual/webview/zooming/zooming.qml b/tests/auto/declarative/visual/webview/zooming/zooming.qml
new file mode 100644
index 0000000..3ac57f6
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/zooming.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+
+// Note that zooming is better done using zoomFactor and careful
+// control of rendering to avoid excessive re-rendering during
+// zoom animations. This test is written for simplicity.
+WebView {
+ width: 200
+ height: 250
+ x: Behavior { NumberAnimation { } }
+ y: Behavior { NumberAnimation { } }
+ scale: Behavior { NumberAnimation { } }
+ url: "zooming.html"
+ preferredWidth: width
+ preferredHeight: height
+ onDoubleClick: {print(clickX,clickY);heuristicZoom(clickX,clickY,2)}
+ onZoomTo: {print(zoom);scale=zoom;x=width/2-centerX;y=height/2-centerY}
+}