PDA

View Full Version : trying to union two headers of QTableWidget



uygar
22nd September 2007, 16:13
Dear all;
I am trying to put a header for 2 columns in a table.

Like I have 2 columns like A and B,

and for the header I would like to put for these 2 columns a "HEADER of A and B"

wysota
25th September 2007, 11:52
If I understand you correctly, then the answer is that you can't do it with the standard table. You'd have to subclass QHeaderView and implement the "join" yourself.

xbase
25th September 2007, 15:55
you could try to embed multiple child tables into one parent table and hide the child table header. say you have column a, b, c and want header to have 2 columns "a and b" and "c" then you would need a parent table with 2 column and a child table with 2 columns (a,b) and a child table with 1 column (c)

see setCellWidget ( int row, int column, QWidget * widget ) of QTableWidget