[PyKDE] pyqt and new-style classes

Roland Schulz r2s2 at gmx.de
Thu Feb 19 16:24:01 GMT 2004


On Do, 2004-02-19 at 11:55, Ulrich Berning wrote:
> Phil Thompson schrieb:
> > On Wednesday 18 February 2004 19:04, Eron Lloyd wrote:

> Nevertheless it makes sense to implement QMetaObject and
> QMetaProperty, just in case someone plans to build a kind of dialog
> editor with PyQt (in the future, we want to give our customers the
> facility to create or modify dialogs or dialog components inside the
> application).

I have done a lib to insert PyQt Widget as Plugin in QtDesinger with
editable properties (if you interested in this search for qtdesinger or
qwidgetplugin in the mail archive or just ask me). Jim, David and Phil
helped me to see that there is no point in implementing QMetaObject in
PyQt but do a Proxy in C++. The main reason were:
There is little use for those MetaObjects functions from Python space.
Even if you write a dialog editor in PyQt you would use the Qt functions
and they would query the MetaObjects. So even in this case those queries
would come from C++ space.
>From C++ space it looks like every class is a object of one of the
wrapper class even if it only indirectly subclass of a wrapper class. So
from C++ space it seams that e.g. a python object of a QWidget class has
the same class as a object of a python class derived from QWidget. Since
most of the MetaObject stuff is done with statics this would complicate
it further.
Like I said, just ask or look at the archives for more information.

regards
Roland




More information about the PyQt mailing list