[PATCH] Make KListView honor renameability

David Faure faure at kde.org
Fri Dec 19 17:16:13 GMT 2003


On Friday 19 December 2003 18:03, Ravi wrote:
> On Friday 19 December 2003 11:43 am, David Faure wrote:
> > On Friday 19 December 2003 17:38, Ravi wrote:
> > > On Friday 19 December 2003 03:11 am, David Faure wrote:
> > > > It's quite scary indeed - there's a global setItemsRenameable and a
> > > > setRenameable per column (in KListView), and a setRenameEnabled per
> > > > column per item (QListViewItem). But QListView doesn't appear to have
> > > > global settings, only per item settings, that's where their model
> > > > differs. I don't see how this can be cleaned up in a BIC way before KDE
> > > > 4.
> > >
> > > Agreed. After playing around with it for a while, I cannot find a way for
> > > the list view to know that a QListViewItem has another child item.
> >
> > ??
> > QListViewItem::firstChild ... but I can't see the relation with the above.
> 
> I see that I was not clear. Consider the following patch which ensures current 
> behavior and is compatible with Qt's model as well:

You can't do that, the two models are not compatible. KListView can't set
a setting in newly created items, as you found out.

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