diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-11-19 22:58:31 +0100 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2020-11-25 23:18:21 +0000 |
commit | d6a5a8525936ce3009ccbe8a68b7fbfa8e50b8ae (patch) | |
tree | 6c07aa8bb5173b68d83f7dc22e1d4f7279ad4e2c /src/quick/items | |
parent | 22852a84a7146e2b36c59731845cba1d0eb3c409 (diff) |
Doc: Document pooled(), reused() signals for ListView QML type
Pick-to: 6.0
Change-Id: Ic8b2fa8333fdc6aae051f3b2faa3a0c0ecad9ad5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/quick/items')
-rw-r--r-- | src/quick/items/qquicklistview.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index 139f6adfac..0c924c0e0e 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -2299,7 +2299,38 @@ QQuickListView::~QQuickListView() \since 5.15 - \sa {Reusing items}, ListView::pooled, ListView::reused + \sa {Reusing items}, pooled(), reused() +*/ + +/*! + \qmlattachedsignal QtQuick::ListView::pooled() + + This signal is emitted after an item has been added to the reuse + pool. You can use it to pause ongoing timers or animations inside + the item, or free up resources that cannot be reused. + + This signal is emitted only if the \l reuseItems property is \c true. + + \sa {Reusing items}, reuseItems, reused() +*/ + +/*! + \qmlattachedsignal QtQuick::ListView::reused() + + This signal is emitted after an item has been reused. At this point, the + item has been taken out of the pool and placed inside the content view, + and the model properties such as \c index and \c row have been updated. + + Other properties that are not provided by the model does not change when an + item is reused. You should avoid storing any state inside a delegate, but if + you do, manually reset that state on receiving this signal. + + This signal is emitted when the item is reused, and not the first time the + item is created. + + This signal is emitted only if the \l reuseItems property is \c true. + + \sa {Reusing items}, reuseItems, pooled() */ /*! |