RFC: About custom widgets in designer / KDevelop4

Andreas Pakulat apaku at gmx.de
Sun Jul 8 12:07:56 UTC 2007


On 08.07.07 13:26:47, Jonas Widarsson wrote:
> Earlier email on kde-devel triggered me.
> 
> On Saturday 07 July 2007, Andreas Pakulat wrote:
> > 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
> 
> First of all, I'd like to point out that a manual designer custom widget 
> plugin enabling process like that is not nearly "really simple" when you 
> weren't prepared for it and expected a simple mouseclick or drag and drop or 
> something like that, which would by the way more easily fit into the "really 
> simple" category. (Man, I am starting to write like the graphics ninja - 
> never ending sentences)

I still disagree, we're not (just) gui-designers, we're developers, so
writing up a plugin class which needs at most less than a handful of
functions properly implemented is a no-brainer. Especially since the
documentation on this is really extensive (although the docs on a
multi-widget-plugin is not that extensive, last I checked)

> I assume the multiple project support I am starting to hear about can do 
> dependencies ? Relying on that:

Yeap it will.

> As KDE devs are way more likely to produce an intelligent result than those 
> strapped up in that giant organisation, I would propose that KDevelop does 
> this for you. Having a project setting that indicates all widgets meeting the 
> requirements should be put in a plugin library that should as automatically 
> as possible be made available for qt4 designer.

Yes, I have plans for exactly that. However its not clear wether this
will be possible, especially trying to load the new widget into an
existing integrated designer window. (although I think it can be made)

> Or maybe I missed an earlier discussion that already dismisses this idea as 
> bad.

You missed a discussion, but one where the outcome was: Unless we face
technical problems it should be done :)

I'm not sure though it'll happen for 4.0, because we need to save
something for KDevelop4.1 and there's already plenty of things to do for
4.0.

Andreas

-- 
You are destined to become the commandant of the fighting men of the
department of transportation.




More information about the KDevelop-devel mailing list