PDA

View Full Version : How to implement Table having mulitple headers for rows and columns.



Hetal
4th May 2011, 13:33
Hi,

I want to create a custom control which supports multiple header for rows and columns. Please have a look into attached image. Also rows and columns of a table can be grouped by clicking on row/column header.

For ex:
6362

I want to use model/view features of Qt for this.
One thought is that I can have QTableView + QAbstractItemModel. And For row and column headers I can use separate QTreeView + QAbstractItemModel. So the hiding of rows and columns when user does collapse/expand on row or column header needs to be handled manually.

I am still new to Qt. So I want suggestions for implementing this kind of control in Qt.
Which kind of Qt's view and model should I use, so that maximum features provided by Qt can be used?