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

List:       kde-devel
Subject:    Re: Fail to link promoted custom widget in .ui file.
From:       "dukju ahn" <dukjuahn () gmail ! com>
Date:       2007-07-07 18:51:37
Message-ID: 9119cdb30707071151u48c05f8fqd5d50312fc02a66a () mail ! gmail ! com
[Download RAW message or body]

2007/7/7, Andreas Pakulat <apaku@gmx.de>:
> On 07.07.07 13:51:54, dukju ahn wrote:
> > Hi. I happen to write custom widget. That new custom widget has
> > its own .ui, .h and .cpp files. And this widget is contained by other
> > widget using QtDesigner. I used "promote" feature in designer,
> > because custom widget are not displayed in designer unless I
> > write separate plugin (which is difficult).
>
> I disagree. Its really simple, just create a QDesignerCustomWidgetPlugin
> (exact name may differ) and implement the needed methods (as per
> designer manual). Compile it into a shared object (don't forget the
> Q_.. macro in the .cpp) and put it into a path that is contained in
> QT_PLUGIN_PATH
>
> > New XXXWidget is part of "util.so" library. When I build
> > the shared "util.so" library, it was successfully built.
> > After that, I tried to use this new widget by linking util.so with
> > kcm plugin("kcm_yyy"). But kcm_yyy.so emits linking error
> > "undefined reference to XXXWidget" Of course, cmakelist.txt
> > was modified to link "util.so"
>
> Did you do a make install in util/? And do you export the new widget
> class with a proper export macro?

I forgot to export macro. Now it works fine.
Thanks.
 
>> 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