Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
ListView, GridView, and TableView all inherit Flickable and provide duplicated properties/methods/signals. For example:
- All views have their own pooled()/reused() attached signals
- All views have their own forceLayout() method
- All views have their own view attached property (although the types are different)
Suggestion
Instead of inheriting Flickable directly, the views could inherit a common (uncreatable) View type which holds the common properties/methods/signals. This would make it easier to implement delegates that can be used in different View types:
// MyDelegate.qml Item { function foo() { ... } function bar() { ... } View.onPooled: foo() View.onReusued: bar() Component.onCompleted: console.log("This delegate was created by a ", View.view) }
The existing duplicated properties/methods/signals can then be deprecated.
Attachments
Issue Links
- relates to
-
QTBUG-129823 Add pooled as a property to ItemDelegate
- Reported