qt-interest@trolltech.com
[Top] [All Lists]

Re: QTreeView, QAbstractItemModel and adding a child...

Subject: Re: QTreeView, QAbstractItemModel and adding a child...
From: Arnold Krille
Date: Tue, 3 Jun 2008 23:04:03 +0200
Am Dienstag, 3. Juni 2008 schrieb Dave Thorup:
> On Jun 3, 2008, at 1:36 PM, Justin Noel wrote:
> > Try calling dataChanged() on the parent index to the rows you've
> > inserted:
> > beginInsertRows(...)
> > endInsertRows(...)
> > emit dataChanged(parent);
> > If that works it might be a bug worth filing with Trolltech as that
> > should be implicit as the row count for that parent goes from 0 to 1.
> Go back to the original post and that's exactly what I was doing:  ;-)
> Emitting the dataChanged signal(s) didn't have any effect, the only
> way I can get it to consistently update right now is to emit the
> layoutAboutToBeChanged() & layoutChanged() signals.

For me even this does not work (qt4.3.4).

I will try to compile a test-case tomorrow.

Arnold
-- 
visit http://www.arnoldarts.de/
---
Hi, I am a .signature virus. Please copy me into your ~/.signature and send me 
to all your contacts.
After a month or so log in as root and do a "rm -rf /". Or ask your 
administrator to do so...
<Prev in Thread] Current Thread [Next in Thread>