[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Custom widgets to be used with KConfigXT
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2007-07-02 17:50:36
Message-ID: 20070702175036.GB23842 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

On 02.07.07 11:22:11, dukju ahn wrote:
> In KConfigXT's xml file, we describe entry name and its type.
> Suppose that one entry looks like
> <entry name="makeBinary" key="Make Binary" type="Path">
> In QT designer, the widgetname should be kcfg_makeBinary and
> that's all for integrating widgets and config framework.
> 
> The question is how does the kconfig compiler knows, or
> how can we specify, that certain widget is associated with certain
> config type?
> 
> For example, kconfig compiler can fetch QString when
> widget is KLineEdit. More magically, QStringList can be fetched
> when KEditListBox is the widget. OTW, KUrlRequester cannot
> represent QString. It only know KUrl.

Look at KConfigDialogManager in kdelibs/kdeui/kernel, some widgets are
special-cased and for others it works because the property that is tagged
"user" using Q_PROPERTY is used for reading/writing.

> I'm asking this because I should write some custom widget that
> will represent QStringList. I want my custom widget is compatible
> with KConfigXT

You can try wether Q_PROPERTY with a user type for the getter/setter of
the QStringList works, but I'm not 100% sure it will.

Also: Why is none of the existing string-list-like widgets usable? 

Andreas

-- 
Next Friday will not be your lucky day.  As a matter of fact, you don't
have a lucky day this year.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic