[Qt-interest] QTreeView Column Spanning

Andreas Pakulat apaku at gmx.de
Fri Mar 20 07:49:57 CET 2009


On 19.03.09 22:56:03, Rick Vernam wrote:
> Hi -
> 
> I'm looking to see if I can combine multiple columns for a given row in a tree 
> view - I suppose this is synonymous with column spanning.
> 
> I read of setFirstColumnSpanned - but this spans across the entire row, I'm 
> only looking to span a few columns (1 or 2 maybe).
> 
> The tree view is using a subclassed QStandardItemModel (only re-implementing 
> hasChildren), with regular QStandardItem data.
> 
> any great ideas amongst you genius Qt folks?

Not possible with QTreeView as it is. I'm not sure its possible with a
QTreeView subclass or wether you'll have to write your own
QAbstractItemView subclass. Only QTableView allows for arbitrary spanning
rows/columns, but it doesn't support trees.

Andreas
 
-- 
What happened last night can happen again.



More information about the Qt-interest-old mailing list