|
| <prev next> |
Re: advise on how to implement KCompletion: msg#00428kde-devel
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 <<
|
|
||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |