[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: How I refresh a QTreeView if the model data changes?
From:       Pedro Lopez-Cabanillas <pedro.lopez.cabanillas () gmail ! com>
Date:       2009-12-30 22:12:38
Message-ID: 200912302312.38323.pedro.lopez.cabanillas () gmail ! com
[Download RAW message or body]

On Wednesday, December 30, 2009, Tomaz Canabrava wrote:
> I have to agree with john here. ;)

I've made one for KMidimon. The basic (crude) coding took me about 3 weeks, 
including a ProxyModel used for filtering. The model provides readable 
representations of MIDI events from a sequence stored in a Song container (a 
QList).
http://kmetronome.cvs.sourceforge.net/viewvc/kmetronome/kmidimon/src/sequencemodel.h?view=markup
http://kmetronome.cvs.sourceforge.net/viewvc/kmetronome/kmidimon/src/proxymodel.h?view=markup
Screenshot: http://sourceforge.net/dbimage.php?id=220552

Indeed, the program records (and plays) MIDI events, so it has to refresh the 
view when new events have been received. But I'm not very satisfied with the 
performance, it is sloooow. Please, has somebody a suggestion about improving  
the performance?

Regards,
Pedro

> On Wed, Dec 30, 2009 at 7:01 PM, John Tapsell <johnflux@gmail.com> wrote:
> > 2009/12/30 Aaron J. Seigo <aseigo@kde.org>:
> >> On December 30, 2009, John Tapsell wrote:
> >>> Making a custom model is difficult - expect it to take half a year to
> >>> get right.
> >>
> >> really depends on the complexity of the model and one's familiarity with
> >> the concepts. there are also some nice tools in the Qt Labs site
> >> somewhere that help test models. 6 months is a really pessimistic view;
> >> i've hacked up models that work quite nicely in an hour or two and
> >> others that i've spent quite a bit of time debugging. as with most
> >> things, the trick is to keep it simple and don't do anything too silly.
> >> treating a model as an interface to an existing data store and nothing
> >> more really helps ime.
> >
> > I'm sorry, I should have qualified that as "for us mortals" :-)
> >
> > John
> >
> >>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >>> unsubscribe <<


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic