[Qt-interest] QAbstractItemModel

Arnold Krille arnold at arnoldarts.de
Sun Mar 29 20:22:36 CEST 2009


On Sunday 29 March 2009 18:46:41 TP wrote:
> But there remains a problem with top-level items, and all the items below
> the top-level items:
> * they never appear (neither the top-level items nor their children),
> whereas I do beginInsertRows(), etc.
> * when additionnally to beginInsertRows(), etc., I emit layoutChanged(),
> the added top-level items appear, but not their children.

Is your model empty when showing the view? I had/have the effect that when the 
model is empty, the top-level is folded. And the very top-level element 
doesn't have a button to unfold. So you have to call expand(...) or 
expandAll() after the first items in the tree appear...

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090329/097a3e9a/attachment.bin 


More information about the Qt-interest-old mailing list