Solved QML: ListView vs Column. When the best solution?
-
Hello!
I've got question - when the best to use ListView and when the best to use Column?
Sugestions? -
@bogong hi
there is not really a best, it depends on your usecase / what you want to achieve
Column is a QML Positioner it will show visual items inside it in a vertical column
ListView description here https://doc.qt.io/qt-5/qml-qtquick-listview.html#detailsListView { id: view height: 100 width: parent.width orientation: Qt.Horizontal model: [0,1,1,2,3,5,8,13,21,34] // values to show delegate: Column{ // showing in column width: 80 height : 100 Text { // a label id: label height:50 text: "value ° " + index } Text { // the value from the model text: modelData height: 50 font.pixelSize: 12 color: "blue" } } }
-
Solution found https://youtu.be/oslnmLQ5Zh8 explained in 4 first minutes when the best to use ListView vs Column with repeater. Issue closed.
-
@bogong,
Column
as inColumnLayout
? -
@BEEDELL-ROKE-JULIAN-LOCKHART Please stop reviving old threads. Also
Column
as inColumn
.