[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:       John Tapsell <johnflux () gmail ! com>
Date:       2009-12-30 22:03:11
Message-ID: 43d8ce650912301403y17eaa70bq39d0146d2fa1b6f8 () mail ! gmail ! com
[Download RAW message or body]

2009/12/30 Michael Pyne <mpyne@kde.org>:
> On Wednesday 30 December 2009 16:01:33 John Tapsell 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" :-)
>
> Indeed, KDE SC 4.4 is upon us and JuK still uses K3ListView. I think I at
> least understand how I would do the port now to a QAbstractItemModel subclass,
> but that hasn't change the fact that making the model seems to be more of a
> PITA than anything else. :-/

Could it just use the QStandardItemModel instead?  Or even just the QTreeWidget.

John
 
>> 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