[Qt-interest] QTreeView to QTreeWidget at run-time?

Rob Simmermon rob.simmermon at simmtechsolutions.com
Wed May 5 20:04:23 CEST 2010


That's what I was afraid of.

But will the headerview also contain sorting information and column order of
the current view?

For example, if the user moved columns around, and sorted by the second
column, will the headerview contain that info, or do I need to somehow track
all of that in the derived QTreeView class?  Also, expanded state will also
be needed for each item in the tree.  I don't think the Model contains this
info.

-----Original Message-----
From: Andreas Pakulat [mailto:apaku at gmx.de] 
Sent: Wednesday, May 05, 2010 10:57 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] QTreeView to QTreeWidget at run-time?

On 05.05.10 10:41:58, Rob Simmermon wrote:
> I don't think I'm explaining this well enough.  I don't care about the
model
> at all.   I basically want the QListVIew that's in a QTreeView copied to a
> QTreeWidget.  I need the exact state of the view, not the model.  So
> whatever is displayed in the view, including column widths, column
headings,
> column order, etc..., I need copied to a QTreeWidget.
> 
> Is this not easily done?

No, you'll have to write that code manually, querying the headerview of the
treeview and set the apropriate things on the treewidget. And for the
actual content you'd still need to go through the model.

Andreas

-- 
You're ugly and your mother dresses you funny.
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list