PDA

View Full Version : horizontal header over two rows in tablewidget



Nippler
25th April 2008, 09:52
I like to have a horizontal header in a qTableWidget that looks like the following example (header over two rows):

-------------------------------------------------------
Amount
-------------------------------------------------------
1.00 | 2.25 | 4.00 | 5.25 | 8.00 | 13.00 | 15.00
-------------------------------------------------------

How can I do that?

I am working with QT4.3.0!

Thanks for any help.

Nippler

Shadowfiend
25th April 2008, 16:24
If it's the last header column, you should be able to use the header's stretchLastSection option. Something like:


tableWidget->horizontalHeader()->setStretchLastSection(true);

Nippler
28th April 2008, 10:33
Thanks for the answer but that isn't what I want. This stretches only the last section horizontally. What I want is a describing header over the real header per column like the example in my thread...