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

List:       kde-devel
Subject:    Re: QtDesigner and KACtionSelector issue
From:       Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date:       2004-10-28 14:11:16
Message-ID: 200410281511.17428.Richard_Dale () tipitina ! demon ! co ! uk
[Download RAW message or body]

On Thursday 28 October 2004 10:50, David Faure wrote:
> On Thursday 28 October 2004 11:13, Lumir Vanek wrote:
> > Hi,
> >
> > I have user widget designed using Qt Designer with *KActionSelector*
> > class. This works OK. But when I try add slots for signals:
> >
> > void KActionSelector::added (QListBoxItem *item)
> > void KActionSelector::removed (QListBoxItem *item)
> >
> > code generated by UIC fails to compile, because forward declaration
> >
> > class QListBoxItem;
> >
> > is not added to .h file.
>
> It's in kactionselector.h, at least in CVS HEAD. Isn't it included from the
> generated .h file? If not, I don't see a solution, other than you adding a
> forwarding decl. in the .ui..

The problem seems partly with older kactionselector.h headers. But the 
QWidgetPlugin api only allows for one header per custom class. It's a shame 
there isn't a QStringList includeFiles() attribute, where those includes 
would be included by Qt Designer before the main include file for the class:

QWidgetPlugin ()
...
virtual QStringList includeFiles ( const QString & key ) const

The kde.widgets .ini format as an attribute name called 'Includes', which is 
already used for any additional includes in the 'Global' entry:

[Global]
PluginName=KDEWidgets
Includes=kinstance.h,classpreviews.h
Init=new KInstance("kdewidgets");

It just needs something like this in individual entries:

[KActionSelector]
Includes=qlistbox.h
IncludeFile=kactionselector.h
ToolTip=A widget for selecting and arranging actions/objects
Group=Views (KDE)

-- Richard
 
>> 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