From kde-devel Thu Oct 28 14:11:16 2004 From: Richard Dale Date: Thu, 28 Oct 2004 14:11:16 +0000 To: kde-devel Subject: Re: QtDesigner and KACtionSelector issue Message-Id: <200410281511.17428.Richard_Dale () tipitina ! demon ! co ! uk> X-MARC-Message: https://marc.info/?l=kde-devel&m=109897262317447 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 <<