View Full Version : spaning the headers in the QTableView

13th April 2008, 17:34
Hello everybody,

I have the task to create the table (QTableView) as it is shown in attachment

I can span the cells but at the same way I need to span the headers. Because spanning the cells (in the row or in the column) the table has unspaned headers.
Do you have an idea of how to span the headers?

13th April 2008, 17:55
Default headers cannot be spanned.

13th April 2008, 17:58
ok but what way can I solve my task?
Do you have any ideas?

13th April 2008, 18:00
merging the cells is impossible in the QTableView object, isn't it?

13th April 2008, 18:03
Spanning is merging. If you want to do something with the header, you need to subclass QHeaderView.

13th April 2008, 18:43
it works!!!!

P.S. Copy and paste :)

11th June 2013, 14:17
I also want to span two column, the link above is not valid anymore, can somebody point to some sample code to span headers.