I’m currently wrapping my mind around model/view programming using Qt via PySide6 in Python. I’m looking for a view that supports displaying the column data of data rows vertically in pairs (for simplification I’m only assuming 2 columns here, A and B). To illustrate this, in a QTableView, data would be displayed like this (for columns A and B):
A B
A B
…
While I want it to display like this:
A
B
A
B
…
Could someone point me to a good starting point to achieve this? I initially played around with displaying data using QDataWidgetMapper for widgets within a QScrollArea, but this doesn’t feel like the right way to do it.
Here’s what I came up with based on Remarkod’s suggestion to use QTreeView. This leaves some space between the pairs of data, but that’s fine for me. I guess it would be possible to completely hide the root items somehow, instead of just leaving them empty and unselectable.