[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    advise on how to implement KCompletion
From:       David Boosalis <david.boosalis () gmail ! com>
Date:       2009-07-31 10:15:46
Message-ID: 870c99310907310315k67cd1e36x61bdd683f3989c14 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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)

[Attachment #5 (text/html)]

Hi.<br><br>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.<br> \
<br>txtcmp::txtcmp():KLineEdit()<br>{<br>  QStringList strList;<br>  strList &lt;&lt; \
i18n(&quot;alpha&quot;) &lt;&lt; i18n(&quot;beta&quot;) &lt;&lt; \
i18n(&quot;gama&quot;);<br> // \
setCompletionMode(KGlobalSettings::CompletionAuto);<br>  KCompletion * kco = \
completionObject();<br>  setCompletedItems(strList);<br>  \
setClearButtonShown(true);<br><br>}<br><br>If I uncomment the third line of the \
method, I get &quot;alpha&quot; to appear when the widget displays, but cannot in any \
way get &quot;beta&quot; to display when I type in any part of &quot;beta&quot;.<br> \
<br>Any advise much apprecited.<br><br>Thanks<br>David<br><br>(I am using KDE from \
svn main)<br>



>> 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