PDA

View Full Version : QTableWidget row-column exchange



SnarlCat
28th August 2008, 13:49
All-

I'm using a (subclass of) QTableWidget to store a single row or column of widgets (the subclass is to 'enforce' the single row/column and make it more list-like).

I'll start simple, and see if I'm just approaching the problem incorrectly. Is there a good way to move elements in a QTableWidget from a single-column to a single-row 'layout', and then collapse the unused columns to a single column? And then visa-versa, but I would think that a solution for one way would be easily modified for the other.

The widgets are placed in the table using QTable::setCellWidget

Eg:
1
1 [A]
2 [B] 1 2 3 4 5
3 [C] becomes 1 [A] [B] [C] [D] [E]
4 [D]
5 [E]

Thanks so much!

SnarlCat