[Qt-interest] EditableTreeMode example crashing with modeltest

Andreas Pakulat apaku at gmx.de
Wed Nov 25 08:52:44 CET 2009


On 25.11.09 10:55:27, Tony Rietwyk wrote:
> Hi Daniel, 
>  
> My understanding is that QAbstractItemModel supports infinitely nested
> spreadsheet cells - so any cell can be a parent.  The hard part is how to
> represent this to the user, in a meaningful way.  None of the supplied views
> support this degree of flexibility.  
>  
> I think QTreeView allows only one column to be nested, and it is the first
> column by convention, but I can't find where I read that in assistant.
> Maybe ModelTest is a bit too strict in that case?

If you look at the relevant comments in the ModelTest class you'll see
that its intent is to help people writing the 'usual' models. Hence it
checks for such weird things like nesting on column 2, which you don't
want in most cases and which can lead to problems when using the model
with Qt's views. 

If you specifically want to have nested columns beyond the first, then
disable the check in the test.

Andreas

-- 
It may or may not be worthwhile, but it still has to be done.



More information about the Qt-interest-old mailing list