[Interest] QCombox::currentIndexChanged(QString) emitted twice?

Danny Koppel dannykoppel at gmail.com
Wed Oct 17 16:51:12 CEST 2012


I would say: does the documentation say anything about it?
If it does not say anything about  the ordering, I would not rely on it.

I've quickly scanned the documentation and I cannot find anything about the order of 2 emitted signals.
It does state that the slots are called  in the order of connecting. (http://doc.qt.digia.com/qt/signalsandslots.html)

Danny


On Oct 17, 2012, at 4:37 PM, Eckhard Jokisch wrote:

> That's why I asked :)
> 
> If the order is not always correct - the doubled emit is pointless and I
> would consider it to be a bug.
> 
> Eckhard
> 
> On 10/17/12 16:01, Danny Koppel wrote:
>> Is there an guarantee that the received order is always correct?
>> If not, you cannot rely on this behaviour.
>> 
>> Danny
>> 
>> 
>> 
>> On Oct 17, 2012, at 3:22 PM, Eckhard Jokisch wrote:
>> 
>>> Hi,
>>> today I discovered that obviously the SIGNAL
>>> QComboBox::currentIndexChanged(QString) is emitted twice when I select a
>>> different item. The first time QString contains the previous string and
>>> the second time it contains the new string.
>>> 
>>> Can I rely on this previous/next  behaviour?
>>> 
>>> This would save a lot of work for me in implementing some extra tracking
>>> of what was selected previously.
>>> 
>>> 
>>> Kind regards
>>> 
>>> Eckhard
>>> _______________________________________________
>>> Interest mailing list
>>> Interest at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>> 
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20121017/cdc93915/attachment.html>


More information about the Interest mailing list