I implemented QAbstractTableModel + TableView with QtQuick 2.12 as described in the official QT docs.
my QML code:
import QtQuick 2.12
import TableModel 0.1
TableView {
anchors.fill: parent
columnSpacing: 1
rowSpacing: 1
clip: true
model: TableModel {}
delegate: Rectangle {
implicitWidth: 100
implicitHeight: 50
Text {
text: display
}
}
}
QAbstractTableModel implemented in C++ as described in docs.
Now my app displays a table that can be scrolled.
How to (or is it possible to)
add header that stays visible when the table is scrolled vertically.
make table rows selectable
use different delegates for different columns
?