AW: [PyKDE] Mixing Qt-App and PyQt
    Andrew Smart 
    Andrew.Smart at smart-knowhow.de
       
    Mon Jul  7 00:45:00 BST 2003
    
    
  
pykde-admin at mats.imk.fraunhofer.de wrote:
> On Thursday 03 July 2003 11:44 am, Andrew Smart wrote:
>> Hi folks,
...
 
>> 
>> Are there some examples around how to pass C++ - Qt-Objects to
>> the PyQt lib?
> 
> sipMapCppToSelf() should do what you want...
> 
> Python_QWindow = sipMapCppToSelf(C++_QWindow,sipClass_QWindow)
> 
> ...and link your app against the SIP module.
> 
> Phil
Hi Phil,
"link your app against the SIP modules" isn't that easy as it
sounds...
I run against 3 major troubles:
- Its "sipClass_QWindow" but "sipClass_QWindowStyle"
  Is this correct?
- I have to build the sip module as static library (its build
  as dll under windows) (I use staticlib instead of dll in the 
  .pro file)
- Additionally I have to build the PyQt library as static library,
  because I need the sipClass_QWindowStyle. (change the "dll" in 
  the build.py to "staticlib")
One additional question:
Can I use the sipMapCppToSelf - function for object which come
from derived classes?
I have a QWindow-based derived MyQWindow-class which I would like
to use. I fear that this won't work... but until I can not build
a static version of the PyQt under Borland I will have to 
wait until this problem is solved.
Andrew
    
    
More information about the PyQt
mailing list