An Useful Model Proposal : KStringDataListModel
David Faure
faure at kde.org
Fri Mar 2 12:07:32 GMT 2007
On Friday 02 March 2007, Bruno Virlet wrote:
> Hello !
>
> On Thursday 01 March 2007, David Faure wrote:
> > > At the risk of asking the obvious: Why not simply use a
> > > QStandardItemModel?
> > > [...]
> > Hmpf. I admit that I didn't think of doing it that way.
> I ported my model to use QStandardItemModel. It is actually nicer.
>
> Please find the patch attached.
Hmm I think Simon's point was that we don't really need a KStringDataListModel class
when the applications can just use QStandardItemModel directly. But I lack experience
with either one to see if the application code would look pretty much fine in both cases, or
very ugly with the latter and very nice with the former, which would be a reason to have
a custom class indeed.
However I see that your model also provides moveUp/moveDown, which is probably not so
obvious to write when using QStandardItemModel directly in the app code.
Simon, do you agree that this makes a good reason for having the class in kdelibs?
There are many widgets/dialogs that have moveup/movedown functionality, like kedittoolbar etc.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list