From kde-devel Fri Jul 31 10:15:46 2009 From: David Boosalis Date: Fri, 31 Jul 2009 10:15:46 +0000 To: kde-devel Subject: advise on how to implement KCompletion Message-Id: <870c99310907310315k67cd1e36x61bdd683f3989c14 () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=kde-devel&m=124903542502063 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0410588575==" --===============0410588575== Content-Type: multipart/alternative; boundary=0016e647125823ecd5046ffdb4a5 --0016e647125823ecd5046ffdb4a5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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) --0016e647125823ecd5046ffdb4a5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi.

I have a simple KLineEdit that I would like to implement its aut= o completer feature.=A0 So far nothing works.=A0 That is I want after typin= g in a few charactors to have the work auto-completed.=A0 Here is what I am= trying.

txtcmp::txtcmp():KLineEdit()
{
=A0 QStringList strList;
=A0 st= rList << i18n("alpha") << i18n("beta") <= < i18n("gama");
=A0// setCompletionMode(KGlobalSettings::Co= mpletionAuto);
=A0 KCompletion * kco =3D completionObject();
=A0 setCompletedItems(strL= ist);
=A0 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 typ= e in any part of "beta".

Any advise much apprecited.

Thanks
David

(I am using K= DE from svn main)
--0016e647125823ecd5046ffdb4a5-- --===============0410588575== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============0410588575==--