[Qt] ComboBox OnChange and OnSelect

zeljko zeljko at holobit.net
Tue Dec 22 15:59:46 CET 2009


On Tuesday 22 December 2009 15:47, Juha Manninen wrote:
> Hi,
>
> I don't know which is the right behavior but GTK2 and QT bindings work
> differently.
> With QT bindings, ComboBox OnChange and OnSelect events are called also
> when adding items in program like:
>   ComboBox.Items.Add('text');
> With GTK2 bindings they are not called.
>
> I needed to react only when user selects an item in combobox. The GTK
> version worked straight away but I had to make an "UpdatingList" flag to
> make the QT version work.
>
> Now, calling OnChange when items are added is actually logical (because the
> list is changing) but OnSelect should be called only on user's selection
> (IMO).
>
> I don't know how Delphi does it.

It's easy to get delphi behaviour with qt, just write here what is the right 
behaviour.

zeljko




More information about the Qt mailing list