diff options
-rw-r--r-- | src/quicktemplates2/qquickscrollview.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickscrollview.cpp b/src/quicktemplates2/qquickscrollview.cpp index dba0d95c..451f54d4 100644 --- a/src/quicktemplates2/qquickscrollview.cpp +++ b/src/quicktemplates2/qquickscrollview.cpp @@ -70,6 +70,20 @@ QT_BEGIN_NAMESPACE \snippet qtquickcontrols2-scrollview-listview.qml file + \section2 Sizing + + As with Flickable, there are several things to keep in mind when using + ScrollView: + \list + \li If only a single item is used within a ScrollView, the content size is + automatically calculated based on the implicit size of its contained item. + However, if more than one item is used (or an implicit size is not + provided), the \l contentWidth and \l contentHeight properties must + be set to the combined size of its contained items. + \li If the content size is less than or equal to the size of the ScrollView, + it will not be flickable. + \endlist + \section2 Scroll Bars The horizontal and vertical scroll bars can be accessed and customized using @@ -359,7 +373,7 @@ QQuickScrollView::QQuickScrollView(QQuickItem *parent) If only a single item is used within a ScrollView, the content size is automatically calculated based on the implicit size of its contained item. - \sa contentHeight + \sa contentHeight, Sizing */ qreal QQuickScrollView::contentWidth() const { @@ -389,7 +403,7 @@ void QQuickScrollView::setContentWidth(qreal width) If only a single item is used within a ScrollView, the content size is automatically calculated based on the implicit size of its contained item. - \sa contentWidth + \sa contentWidth, Sizing */ qreal QQuickScrollView::contentHeight() const { |