diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-05-01 01:07:52 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-05-01 01:07:52 (GMT) |
commit | 94dff487709583068bdc002a955cf5b423cae614 (patch) | |
tree | 7c27e546986c478de9ac7d8fc8b5b481acddde09 /src/declarative/fx/qfxflickable.cpp | |
parent | dae1a84e571691e32147e7d1699e161693dbfee1 (diff) | |
download | Qt-94dff487709583068bdc002a955cf5b423cae614.zip Qt-94dff487709583068bdc002a955cf5b423cae614.tar.gz Qt-94dff487709583068bdc002a955cf5b423cae614.tar.bz2 |
More format conversion.
Diffstat (limited to 'src/declarative/fx/qfxflickable.cpp')
-rw-r--r-- | src/declarative/fx/qfxflickable.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp index 671d65d..17e44e1 100644 --- a/src/declarative/fx/qfxflickable.cpp +++ b/src/declarative/fx/qfxflickable.cpp @@ -232,9 +232,10 @@ QML_DEFINE_TYPE(QFxFlickable,Flickable); Flickable places its children on a surface that can be dragged and flicked. \code - <Flickable width="200" height="200" viewportWidth="{image.width}" viewportHeight="{image.height}"> - <Image id="image" file="bigimage.png"/> - </Flickable> + Flickable { + width: 200; height: 200; viewportWidth: image.width; viewportHeight: image.height + Image { id: image; source: "bigimage.png" } + } \endcode \image flickable.gif @@ -257,9 +258,10 @@ QML_DEFINE_TYPE(QFxFlickable,Flickable); QFxFlickable allows its children to be dragged and flicked. \code -<Flickable width="320" height="480" viewportWidth="{image.width}" viewportHeight="{image.height}"> - <Image id="image" file="bigimage.png"/> -</Flickable> +Flickable { + width: 320; height: 480; viewportWidth: image.width; viewportHeight: image.height + Image { id: image; source: "bigimage.png" } +} \endcode Note that QFxFlickable does not automatically clip its contents. If @@ -475,9 +477,11 @@ bool QFxFlickable::isAtYBeginning() const These properties are typically used to draw a scrollbar, for example: \code - <Rect opacity="0.5" anchors.right="{MyListView.right-2}" width="6" - y="{MyListView.pageYPosition * MyListView.height}" - height="{MyListView.pageHeight * MyListView.height}"/> + Rect { + opacity: 0.5; anchors.right: MyListView.right-2; width: 6 + y: MyListView.pageYPosition * MyListView.height + height: MyListView.pageHeight * MyListView.height + } \endcode */ qreal QFxFlickable::pageWidth() const @@ -879,9 +883,10 @@ void QFxFlickable::setOverShoot(bool o) should be set to the combined size of the items placed in the Flickable. \code - <Flickable width="320" height="480" viewportWidth="{image.width}" viewportHeight="{image.height}"> - <Image id="image" file="bigimage.png"/> - </Flickable> + Flickable { + width: 320; height: 480; viewportWidth: image.width; viewportHeight: image.height + Image { id: image; source: "bigimage.png" } + } \endcode */ |