[Qt-interest] qcompleter and multiple items

Sandro Cavazzoni s.cavazzoni at adss.it
Mon Nov 23 11:20:16 CET 2009


I supposed too... but it doesn't work
I do this in "textchanged" signal from QLineEdit

qDebug() << this->m_Completer->currentIndex().row();

the value is always 0

KC Jones ha scritto:
> QCompleter::currentIndex() should give you what you need, right?
> 
> On Fri, Nov 20, 2009 at 7:19 AM, Sandro Cavazzoni <s.cavazzoni at adss.it> wrote:
>> Hi to all,
>> i'm working with QCompleter and it work great.
>> But i've a question... in my list i could have a multiple choices with
>> the same name. QCompleter show it to me correctly... but how can i
>> discover the exact index of the selected element? (i need to know if the
>> user selected the first or the second)
>> Is it possible to do it?
>>
>> Thank you
>>
>> Regards
>>
>> Sandro
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>



More information about the Qt-interest-old mailing list