1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
import QtQuick
import QtQuick.Layouts
ColumnLayout {
property alias listView: listView
ListView {
id: listView
visible: count > 0 // actual defect. countChanged never fires so this never turns true
Layout.fillWidth: true
Layout.preferredHeight: contentHeight // grow with content, initially 0
model: ListModel {
id: idModel
}
delegate: Text {
required property string name
text: name
}
Timer {
running: true
interval: 10
repeat: true
onTriggered: idModel.append({name:"Hello"})
}
}
}
|