New class KListWidgetSearchLine

Adam Treat treat at kde.org
Tue Mar 13 18:38:57 GMT 2007


Why isn't this widget (and the related one for trees) a part of Qt anyway?

Tons of apps use just this kind of functionality not only on Qt, but on 
Windows and Mac too.  It has become a pretty fundamental widget I would say.

If TT implemented this, they could provide one widget for all uses whether the 
underlying widget was a view or a convenience view since it you guys have 
access to the convenience view's internal model.

How about such as QAbstractItemView like 'setSearchLine(QSearchLine 
*searchLine);'  Of course, you'd have to create QSearchLine, but seems pretty 
straightforward.

Adam

On Monday 12 March 2007, Simon Hausmann wrote:
> On Monday 12 March 2007 00:17:32 Tobias Koenig wrote:
> > On Sun, Mar 11, 2007 at 11:10:01PM +0100, Albert Astals Cid wrote:
> > Hi Albert,
> >
> > > I'm attaching the two files. I want to commit tomorrow as it's just a
> > > port from the old class and seems to be working quite good.
> >
> > Could you please replace 'NULL' by '0' and move the private slot to a
> > Q_PRIVATE_SLOT before commiting?
> >
> > And maybe the setCaseSensitive( bool ) could be replaced by a
> > setCaseSensitivity( Qt::CaseSensitivity ) as well :)
>
> I agree with Tobias. I have one additional thought though:
>
> I think KListWidgetSearchLine (with a different name) could be a lot more
> usable if it would provide a widget and a sortfilterproxymodel
> implementation instead of being bound to QListWidget.
>
> In case of KIconDialog it would be just a matter of using
> QStandardItemModel and QListView, which should be just as convenient as
> using QListWidget directly.
>
> Simon




More information about the kde-core-devel mailing list