[PyKDE] Passing C++-created QWidgets to embedded Python

ian reinhart geiser geiseri at yahoo.com
Tue Apr 16 13:30:38 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cool this explanes why I get all of these funky crashes.  I guess no-one ever 
assumed PyQt would every be crossplaform :\

Robin could you please send me a diff of your changes or the pyqt headers you 
used.  I unfortunately cannot wait for the next PyQt release to fix all of 
these windows bugs.

I wonder if we cannot make a PYQT_EXPORT and PYQT_IMPORT?  I am not sure how 
we can get these autogenerated on the fly though.  Any thoughts on this Phil?  

- -ian reinhart geiser


On Tuesday 16 April 2002 04:00 am, Robin Summerhill wrote:
> I finally worked out what was going wrong here.
>
>
> It's to do with the requirement to mark declarations with
> __declspec(DLLEXPORT) or _declspec(DLLIMPORT)to get DLL linking working
> properly with MSVC.
>
>
> SIP_EXTERN is declared in sip.h and ends up as SIP_EXPORT or SIP_IMPORT
> according to whether the preprocessor symbols SIP_MAKE_DLL or SIP_USE_DLL
> are defined. Sip.exe uses this declaration to enable sip-generated headers
> to be used both in building the dll (EXPORT) and the client of the dll
> (IMPORT). However, the sip-generated headers that are included in the PyQT
> distribution have been edited to change SIP_EXTERN to SIP_EXPORT, meaning
> that these headers can only be used to build the libqtc dll, *not* consume
> it.
>
>
> There is no clean way around this with the present setup, because
> SIP_EXTERN is used in the SIP headers too. You can't just change SIP_EXPORT
> back to SIP_EXTERN because that prevents you from building libqtc.
>
>
> As a temporary measure, I'm keeping two sets of the libqtc headers - one to
> build libqtc (with SIP_EXORT) and one to include in the client (with
> SIP_EXTERN and SIP_USE_DLL defined)
>
>
> Having done this (and recompiling everything with -MD to solve my other
> problems) I can now embed PyQT and it's just *fantastic*
>
>
> Robin Summerhill
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8vAtWPy62TRm8dvgRAobcAJ0QHVqS9g6Gjx+NUP9X0qiO772XgwCfVcbC
4Gge3cKNRnZkCwTnrHIY4m0=
=IOOu
-----END PGP SIGNATURE-----


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





More information about the PyQt mailing list