From kde-devel Wed Dec 31 15:30:54 2003 From: Waldo Bastian Date: Wed, 31 Dec 2003 15:30:54 +0000 To: kde-devel Subject: Re: Questions of kcfg compiler Message-Id: <200312311630.55652.bastian () kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=107288469123076 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed December 31 2003 09:14, Kevin Gilbert wrote: > Hi all, > > Sorry to be a pest (again), but a few questions on *.kcfg files: > > 1) How can I use a QComboBox widget that I dynamically load (ie, clear() > append append() type stuff)? I've tried lots of things but the software > steadfastly refuses to recognise any option that was not specified in Qt > Designer. See e.g. EncryptedDropEvent in kdeutils/kgpg/kgpg.kcfg and conf_ui.ui If you allow arbitrary strings in your combobox the configuration option should be of type String instead of an Enum. > 2) What is the best way of presenting the user with a list of composite > objects (each object consisting of a QDateTime and QString object) for > review? My first impression was to use a KListView and three > QPushButton's ("&New", "&Edit" and "&Delete"). But how do I configure > the buttons in the *.kcfg XML script? You don't. The .kcfg file describes the configuration options, not the user interface. The pushbuttons would only be used to manipulate the user interface, they don't represent a configuration option. Apart from that, you probably need to handle these composite objects yourself, since they are not standard. See e.g. kdeutils/kgpg/kgpgoptions.cpp for an example. Several settings such as "page4->use_agent" are handled here in a special way. > I've looked at the source to the compiler (kconfig_compiler.cpp) but > that hasn't given me any solutions. I've also looked for documentation - > again with now success. :-( > > Without wanting to be disrespectful, but is the kconfig_compiler "the > coming thing" (tm) and still a "bit underdone" Yes, it's new in KDE 3.2 > or is it "yesterday's brainwave" that should be silently discarded? This is > an innocent question - I'm willing to perserve with this facility if it is > in the best interests of KDE. It is supposed to take care of handling 90% of the trivial settings, but there will always remain another 10% (such as your compound objects) that will require special attention. Cheers, Waldo - -- bastian@kde.org -=|[ KDE: K Desktop for the Enterprise ]|=- bastian@suse.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE/8uuuN4pvrENfboIRAmusAJ9rvHTlWEvDCYTEtg1LPqEBq78F+QCfQbBr OyCEJvfN7h6H8kGiZJmEy1U= =kYD8 -----END PGP SIGNATURE----- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<