[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: advise on how to implement KCompletion
From: Albert Astals Cid <aacid () kde ! org>
Date: 2009-07-31 18:40:57
Message-ID: 200907312040.58136.aacid () kde ! org
[Download RAW message or body]
A Divendres, 31 de juliol de 2009, David Boosalis va escriure:
> Hi.
>
> I have a simple KLineEdit that I would like to implement its auto completer
> feature. So far nothing works. That is I want after typing in a few
> charactors to have the work auto-completed. Here is what I am trying.
>
> txtcmp::txtcmp():KLineEdit()
> {
> QStringList strList;
> strList << i18n("alpha") << i18n("beta") << i18n("gama");
> // setCompletionMode(KGlobalSettings::CompletionAuto);
> KCompletion * kco = completionObject();
> setCompletedItems(strList);
> setClearButtonShown(true);
>
> }
>
> If I uncomment the third line of the method, I get "alpha" to appear when
> the widget displays, but cannot in any way get "beta" to display when I
> type in any part of "beta".
>
> Any advise much apprecited.
kcompletionuitest from kdelibs/kdeui/tests seems to work for me so you could
have a look at its code.
Albert
>
> Thanks
> David
>
> (I am using KDE from svn main)
>> 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