[PyKDE] PyKDE update

Gordon Tyler gordon at doxxx.net
Mon Sep 29 21:10:01 BST 2003


David Boddie wrote:

> On Sun, 28 Sep 2003 22:38:39, Jim Bublitz wrote:
> 
> 
>>If anyone's urgently in need of the next PyKDE release, or has
>>any other input, please speak up. I can put totgether another rc
>>release (more like a snapshot) in a few days if necessary.
> 
> 
> Is there any way to cast Python QObject instances to other objects
> from within Python? An equivalent to this, for example:
> 
> KHTMLPart *part = (KHTMLPart *) parent();

I don't think that sort of concept really makes sense in Python. 
Type-casting in C/C++ just determines the particular interface through 
which your code is then accessing the object, it doesn't change the 
object's intrinsic type. Python only ever deals with an object's 
intrinsic type since it's a dynamically typed language.

However, the problem may be that the sip translation is not translating 
that subclass. See my earlier patch for some subclass mapping that Jim 
extended and incorporated into one of the 3.8rc releases.

Ciao,
Gordon





More information about the PyQt mailing list