Important: Please read the Qt Code of Conduct -

section-wise scrolling in TableView

  • Hi,

    is there a way to make the first section of a TableView stick to the top while scrolling? In particular I want the scrolling to work section-wise.

  • Lifetime Qt Champion


    Do you mean something like the Frozen Column Example ?

  • @SGaist That's pretty close to what I like to achieve. Unfortunately I am using a QML TableView. The only difference to the FrozenColumnExample is that my Frozen Rows have a dynamic count. A binary role in my table model determines to which section the entry belongs to. I will try to adapt the FrozenColumnExample to my case in QML. That was my idea anyway, but I was hoping for more simple solution ;) Substituting the sections with seperate TableViews and using a QSortFilterProxyModel to simulate the section behavior is the way to go I guess. Thx for your tip.