logo       

advise on how to implement KCompletion: msg#00423

kde-devel

Subject: advise on how to implement KCompletion

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.

Thanks
David

(I am using KDE from svn main)

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise