aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/snippets
diff options
context:
space:
mode:
authorNico Vertriest <nico.vertriest@digia.com>2015-06-04 12:41:56 +0200
committerNico Vertriest <nico.vertriest@digia.com>2015-06-25 10:58:58 +0000
commitc3d26e75b0a9cc9848ebe316ee88b29655a6564f (patch)
tree8f23a2a85dfc76e046b04783307f602553f27eb4 /src/quick/doc/snippets
parent3e5a89ae70eb612afef0d593f180a57da17c782f (diff)
Doc: resize tables with overflow
Task-number: QTBUG-46475 Change-Id: Iebb2f7677f8b514d2b3e08480abfc98a0e155c1c Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Diffstat (limited to 'src/quick/doc/snippets')
-rw-r--r--src/quick/doc/snippets/qml/loader/KeyReader.qml3
-rw-r--r--src/quick/doc/snippets/qml/loader/sizeitem.qml29
-rw-r--r--src/quick/doc/snippets/qml/loader/sizeloader.qml29
-rw-r--r--src/quick/doc/snippets/qml/propertyanimation.qml6
4 files changed, 37 insertions, 30 deletions
diff --git a/src/quick/doc/snippets/qml/loader/KeyReader.qml b/src/quick/doc/snippets/qml/loader/KeyReader.qml
index a61d2bd11a..eebd72b96d 100644
--- a/src/quick/doc/snippets/qml/loader/KeyReader.qml
+++ b/src/quick/doc/snippets/qml/loader/KeyReader.qml
@@ -37,7 +37,8 @@ Item {
Item {
focus: true
Keys.onPressed: {
- console.log("Loaded item captured:", event.text);
+ console.log("Loaded item captured:",
+ event.text);
event.accepted = true;
}
}
diff --git a/src/quick/doc/snippets/qml/loader/sizeitem.qml b/src/quick/doc/snippets/qml/loader/sizeitem.qml
index db79e28816..750ea9f58a 100644
--- a/src/quick/doc/snippets/qml/loader/sizeitem.qml
+++ b/src/quick/doc/snippets/qml/loader/sizeitem.qml
@@ -34,21 +34,22 @@
import QtQuick 2.0
Item {
- width: 200; height: 200
+ width: 200; height: 200
- Loader {
- // position the Loader in the center of the parent
- anchors.centerIn: parent
- sourceComponent: rect
- }
+ Loader {
+ // position the Loader in the center
+ // of the parent
+ anchors.centerIn: parent
+ sourceComponent: rect
+ }
- Component {
- id: rect
- Rectangle {
- width: 50
- height: 50
- color: "red"
- }
- }
+ Component {
+ id: rect
+ Rectangle {
+ width: 50
+ height: 50
+ color: "red"
+ }
+ }
}
//![0]
diff --git a/src/quick/doc/snippets/qml/loader/sizeloader.qml b/src/quick/doc/snippets/qml/loader/sizeloader.qml
index d691f460cb..9643768774 100644
--- a/src/quick/doc/snippets/qml/loader/sizeloader.qml
+++ b/src/quick/doc/snippets/qml/loader/sizeloader.qml
@@ -34,21 +34,22 @@
import QtQuick 2.0
Item {
- width: 200; height: 200
+ width: 200; height: 200
- Loader {
- // Explicitly set the size of the Loader to the parent item's size
- anchors.fill: parent
- sourceComponent: rect
- }
+ Loader {
+ // Explicitly set the size of the
+ // Loader to the parent item's size
+ anchors.fill: parent
+ sourceComponent: rect
+ }
- Component {
- id: rect
- Rectangle {
- width: 50
- height: 50
- color: "red"
- }
- }
+ Component {
+ id: rect
+ Rectangle {
+ width: 50
+ height: 50
+ color: "red"
+ }
+ }
}
//![0]
diff --git a/src/quick/doc/snippets/qml/propertyanimation.qml b/src/quick/doc/snippets/qml/propertyanimation.qml
index 2d8a3744ce..1cbb84e1db 100644
--- a/src/quick/doc/snippets/qml/propertyanimation.qml
+++ b/src/quick/doc/snippets/qml/propertyanimation.qml
@@ -92,7 +92,11 @@ Rectangle {
color: "red"
// this is a standalone animation, it's not running by default
- PropertyAnimation { id: animation; target: theRect; property: "width"; to: 30; duration: 500 }
+ PropertyAnimation { id: animation;
+ target: theRect;
+ property: "width";
+ to: 30;
+ duration: 500 }
MouseArea { anchors.fill: parent; onClicked: animation.running = true }
}