Re: AW: [PyKDE] Mixing Qt-App and PyQt

2003-07-07 Thread Phil Thompson
On Sunday 06 July 2003 11:42 pm, Andrew Smart wrote:
 [EMAIL PROTECTED] 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)

QWindow and QWindowsStyle (not QWindowStyle) are different classes. QWindow 
was dropped in Qt v2.

You will also need to link against the qtc module.

 One additional question:

 Can I use the sipMapCppToSelf - function for object which come
 from derived classes?

A assume you mean derived in C++. You can do it, but, as far as PyQt is 
concerned, its type will be the base class. If you want PyQt to recognise the 
derived class then you need to SIP it.

 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

Phil

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


AW: [PyKDE] Mixing Qt-App and PyQt

2003-07-06 Thread Andrew Smart
[EMAIL PROTECTED] 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

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde