[Interest] QAIV: different header data for non-empty root index

Иван Комиссаров abbapoh at gmail.com
Mon May 19 14:24:15 CEST 2014


Hello. I would like to implement a model (and a view) that supports multiple child levels (subtables) for each item in a table. Model implementation is quite easy, view is a QColumnView+QTableView as a column.

However, i got a problem with QHeaderViews in a QTableViews - headerData doesn’t accept QModelIndex (parent) as a parameter, so it is impossible to return different header data for subtables.

The only approach i see is to copy/paste QHeaderView code and change Model::headerData() calls with calls to Model::data() function with specific user role.

Am i missing something or this is the only way?

Thanks in advance.

Ivan


More information about the Interest mailing list