diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-11-24 23:00:17 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-11-24 23:00:17 (GMT) |
commit | c2e21fea3cd670127a898ac2ff5abd8135bde5f0 (patch) | |
tree | bf49e35e7dffe54301aab6cae5874977bc696496 /tests/auto/declarative/qmlvisual/webview/flickable/flickweb.qml | |
parent | be28cdcc51a8c22151199bcf8cd171e28287e8d0 (diff) | |
parent | 422282c4f3e439990abc6c6b79699d943b9541d7 (diff) | |
download | Qt-c2e21fea3cd670127a898ac2ff5abd8135bde5f0.zip Qt-c2e21fea3cd670127a898ac2ff5abd8135bde5f0.tar.gz Qt-c2e21fea3cd670127a898ac2ff5abd8135bde5f0.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'tests/auto/declarative/qmlvisual/webview/flickable/flickweb.qml')
-rw-r--r-- | tests/auto/declarative/qmlvisual/webview/flickable/flickweb.qml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/webview/flickable/flickweb.qml b/tests/auto/declarative/qmlvisual/webview/flickable/flickweb.qml new file mode 100644 index 0000000..6063226 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/webview/flickable/flickweb.qml @@ -0,0 +1,35 @@ +import QtQuick 1.0
+import QtWebKit 1.0
+
+Flickable {
+ id: flickable
+ width: 320
+ height: 200
+ contentWidth: Math.max(flickable.width,webView.width)
+ contentHeight: Math.max(flickable.height,webView.height)
+ pressDelay: 100
+
+ WebView {
+ id: webView
+ transformOrigin: Item.TopLeft
+ smooth: false // We don't want smooth scaling, since we only scale during (fast) transitions
+ url: "test.html"
+ preferredWidth: flickable.width
+ preferredHeight: flickable.height
+ contentsScale: 1
+ onContentsSizeChanged: {
+ // zoom out
+ contentsScale = Math.min(1,flickable.width / contentsSize.width)
+ }
+ }
+
+ Rectangle {
+ id: button
+ width: 50; height: 50; color: "red"
+ MouseArea {
+ anchors.fill: parent
+ onPressed: button.color = "blue"
+ onReleased: button.color = "green"
+ }
+ }
+}
|