KConfigDialog

Jeremy Whiting jpwhiting at kde.org
Wed Oct 29 22:09:09 GMT 2014


The widget is a combobox of languages, where we show the language
name, but store the language two leter iso string in config. Maybe it
can be done with kconfigxt, dunno. I'll look into it, thanks.

Jeremy


On Wed, Oct 29, 2014 at 4:00 PM, Albert Astals Cid <aacid at kde.org> wrote:
> El Dilluns, 27 d'octubre de 2014, a les 22:22:12, Jeremy Whiting va escriure:
>> Hello,
>>
>> Is there a way to have custom settings mixed with kcfg_ type settings
>> in a KConfigDialog? Kanagram does this, but it only works when another
>> kcfg_ named widget changes too. The combobox to select which language
>> to use gets saved to disk by a slot that's connected to
>> KConfigDialog's settingsChanged(QString) signal, but this is only
>> emitted when one of the kcfg_ named widgets changes and apply is
>> clicked. Kanagram's mainsettings class enables the apply button
>> programatically when the language combobox changes, but hitting apply
>> or ok doesn't emit the settingsChanged signal so the language is never
>> saved in this case. I could connect to QDialog's accepted() signal,
>> but then it may be too late to get the widget's currentIndex and save,
>> etc. So I thought I'd ask if anyone else has seen mixed settings in a
>> KConfigDialog or knows how to mix the two.
>
> Sure, read the docu ;)
>
> Specially the protected slots and virtuals like updateButtons, hasChanged,
> etc.
>
> I'm interested though in which widget you have that you can't use kconfigxt
> magic.
>
> Cheers,
>   Albert
>
>>
>> thanks,
>> Jeremy
>>
>> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
>> >> <<
>
>




More information about the kde-core-devel mailing list