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

Andreas Pakulat apaku at gmx.de
Wed Oct 17 20:56:49 CEST 2012


Hi,

On Wed, Oct 17, 2012 at 3:22 PM, Eckhard Jokisch <qt at eckhard-jokisch.de> 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?

As Tony said, I'd suspect a bug in your code when you see this. Note
that this signal is also emitted when you change the selected item
programatically. If you're only interested in user-triggered changes,
you should use the activated signal

Andreas



More information about the Interest mailing list