[PyKDE] Re: newest Version
Roland Schulz
mail at r2s2.de
Wed Oct 29 21:48:00 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 29 October 2003 15:53, Jim Bublitz wrote:
> On Tuesday October 28 2003 23:42, Roland Schulz wrote:
> I'm certainly willing to generate any necessary additional
> bindings, and Phil is willing to do some PyQt changes, but at
> least in my case, I'm not sure of what's really necessary. It
> seems to me this can all be done most easily in C++ inside the
> plugin, so I must be missing something (again).
Please discribe how you think it can be done in the plugin. Like I wrote
previously, I think that this can't be done. The problem I see is:
The lib creates an object and afterwards qtdesigner has this object and just
calls the methods it wants to. How do you want to intercept there?
So I think this has to be done in the sip code.
What I think should be done is (all in C++ space):
- - Add an static QMap to sipQObject containing all QMetaObject's for all loaded
Python classes (the index can be the classname or some id).
- - Add to the constructor of sipQObject:
- check if the QMetaObject for this Python class is already constructed
- if not create the QMetaObject. The data is read out from variables in the
Python class
- - Add the method metaObject (so this version is called from C++ space, its not
needed from Python space)
it looks for its class QMetaObject in the QMap and returns it
Questions:
Are the additions to the constructor and to metaObject automatically for all
subclasses of QObject?
Why is the call of the method classname for a Python class from the C++ space
not giving its name?
How can we find out the classname of the Python class in the constructor and
in the metaobject method?
How can we access the variables in the Python class containing the meta Data?
How can we add the metaObject method but only for calls from c++ space?
I hope that this isn't complete nonsense. ;-)
regards
Roland
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE/oCcXV/hlvQgMogsRAhalAKCbbXzZGNb9ry3zCXw0Sqzm6pEf7QCeLS8v
0Fh8kISBHBWXLB8hYY97oNw=
=8Yld
-----END PGP SIGNATURE-----
More information about the PyQt
mailing list