ListViews inside ScrollViews, Part 2
I encountered this problem again in my new app. This time however I found this and toyed a bit with the LayoutUpdateHandler. The idea is simple:
Give the ListView component a "calculatedHeight" property
Add a LayoutUpdateHandler to the text labels of undefined height
Add the layoutFrame.height to the calculatedHeight whenever onLayoutFrameChanged is called
The pages listen to onCalculatedHeightChanged()
Don't forget your component padding
attachedObjects: [ LayoutUpdateHandler { id: layoutUpdate onLayoutFrameChanged: { Qt.addToCalculatedHeight(layoutFrame.height + ui.sdu(5)); } } ]
Works perfectly.
















