From kde-devel Sat Oct 24 08:34:30 2009 From: Niels Date: Sat, 24 Oct 2009 08:34:30 +0000 To: kde-devel Subject: Re: substring completion in KLineEdit Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=125637334916655 On Friday 23 October 2009 21:32, Oszkar Ambrus wrote: > On 23/10/09 20:14, Aleix Pol wrote: >> You can do quite a lot of things with QCompleter, you can check the >> ExpressionEdit class in KAlgebra >> (trunk/kdeedu/kalgebra/src/expressionedit.cpp). I'm not sure about what >> you mean by substringCompletion, but i think you can check in that code >> and you will find it. > Thanks for the example. But it uses QCompleter, and it only does prefix > completion. > > KCompletion::substringCompletion() returns the completion list based on > sub-string checking. That means it doesn't just do prefix checking. > > It's just what Firefox does: when you type something into the address > bar, it lists everything that has that expression in it. [snip rest] Just FYI, I personally find the Firefox substring thing confusing. The current (KDE3) Konqueror location bar allows me to select between several completion methods, and that's very cool. You could add substring completion to such a list, so that I could disable it. I always use the "Dropdown list & Automatic" option whereever possible. //Niels >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<