KComboBox in designer WAS Re: kartesio
Kevin Krammer
krammer at kde.org
Thu May 9 11:56:42 UTC 2013
On Wednesday, 2013-05-08, Orestes Mas wrote:
> My reasoning was: I've a ComboBox letting user choose between ALSA or
> PulseAudio sound systems. If user changes current combo selection, I want a
> second combo (the one we are speaking of) to ask gstreamer for a list of
> audio devices in the new selected sound system, and to fill itself with
> these values.
>
> As this operation requires a bit more intelligence than a standard combo,
> my idea was to derive a class implementing the suitable functionality.
>
> So, if I understand you correctly, your advice is to transfer all this
> behaviour from my custom combo to the class containing it, am I right? For
> instance, let the widget containing the combo (in my cas is a customized
> settings dialog) detect changes in the first combo and updating the second
> one accordingly.
If the "additional intelligence" part is fillig the second combobox, you could
think about implementing a list model that changes its contents accordingly
and use that on the combobox.
But having one specialized class that handles the combobox (its content and
any additional behavior) would be a good choice as well.
Cheers,
Kevi
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20130509/32a4d78c/attachment.sig>
More information about the kde-edu
mailing list