Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
-
768209aebcbc66fec3a600be0a0f0e58d9f405d8
Description
In the modelviews/listview/expandingdelegates.qml (recipes) example, clicking on a recipe should expand it to the full dimensions of the view. However, the recipe doesn't expand to the full height of the view if the list has not yet been flicked. Once it has been flicked, the items will expand correctly.
Here is a standalone example:
import Qt 4.7 ListView { id: flick width: 150; height: 180 model: ListModel { ListElement {} ListElement {} ListElement {} ListElement {} ListElement {} } delegate: Rectangle { id: rect width: 100; height: 50; border.width: 1 Text { text: index+1 } MouseArea { anchors.fill: parent onClicked: parent.state = (parent.state == "expanded" ? '' : 'expanded') } states: State { name: "expanded" PropertyChanges { target: rect; height: flick.height; width: flick.width } PropertyChanges { target: flick; contentY: rect.y; explicit: true } } transitions: Transition { NumberAnimation { duration: 300; properties: "contentY,height,width" } } } }
I'm guessing the problem is in ListView rather than Flickable, since I don't see the same problem with
a Column of Rectangles inside a Flickable.