[Kde-bindings] QWidgetFactory in ruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Wed Apr 14 09:28:59 UTC 2004
[22:56:19] <taj> QWidgetFactory sucks!
[22:56:53] <taj> AFAIK you can't get widget metadata without actually
instantiating the UI
[22:57:17] taj agrees that parsing the UI is a much better solution in the
medium term
[22:59:24] taj would be very happy to be proven wrong though
[23:03:45] taj is working on an import hook for python that allows you to
directly import ui files instead
of via pyuic, and so far I can't find a way to do it with QWidgetFactory and
still allow subclassing of the
UI-specified widgets
I've reading about the QWidgetFactory, and I wonder if it would be easier to
either rewrite or translate it to ruby, and parse the .ui file as taj said on
#kdebindings. Otherwise, the kde plugin will just instantiate vanilla kde
widgets, they won't be ruby Smoke 'shadow' classes that could be subclassed.
A call like createWidget would be really simple to implement in ruby, and you
wouldn't need any custom QWidgetFactories - I think all they do is work round
the undynamic nature of C++:
virtual QWidget * createWidget ( const QString & className, QWidget * parent,
const char * name ) const
-- Richard
More information about the Kde-bindings
mailing list