diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-07-02 10:47:25 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-07-04 06:32:31 +0000 |
commit | 97ff7edffb23517f21b07e74283cae67c2dfca7f (patch) | |
tree | 18733be43e9cc79c787e983d888cfd92d5c6bb28 /src/quick/items | |
parent | 44e4f8b360367bc846f1d9cbe55876466fea4356 (diff) |
Doc: add a section that demonstrates various contentX/contentY states
This makes it easier to visualize how the properties work.
Change-Id: I04cb1a99a1f831e5c892cb27e4a0cd127fe450e0
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'src/quick/items')
-rw-r--r-- | src/quick/items/qquickflickable.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index d892e3b490..cc35630fff 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -632,6 +632,31 @@ void QQuickFlickablePrivate::updateBeginningEnd() \c contentItem that are relevant. For example, the bound of Items added to the Flickable will be available by \c contentItem.childrenRect + \section1 Examples of contentX and contentY + + The following images demonstrate a flickable being flicked in various + directions and the resulting \l contentX and \l contentY values. + The blue square represents the flickable's content, and the black + border represents the bounds of the flickable. + + \table + \row + \li \image flickable-contentXY-resting.png + \li The \c contentX and \c contentY are both \c 0. + \row + \li \image flickable-contentXY-top-left.png + \li The \c contentX and the \c contentY are both \c 50. + \row + \li \image flickable-contentXY-top-right.png + \li The \c contentX is \c -50 and the \c contentY is \c 50. + \row + \li \image flickable-contentXY-bottom-right.png + \li The \c contentX and the \c contentY are both \c -50. + \row + \li \image flickable-contentXY-bottom-left.png + \li The \c contentX is \c 50 and the \c contentY is \c -50. + \endtable + \section1 Limitations \note Due to an implementation detail, items placed inside a Flickable @@ -737,7 +762,7 @@ QQuickFlickable::~QQuickFlickable() for the position; another way is to use the normalized values in \l {QtQuick::Flickable::visibleArea}{visibleArea}. - \sa originX, originY + \sa {Examples of contentX and contentY}, originX, originY */ qreal QQuickFlickable::contentX() const { |