[PyQt] SIP API v2 at compile time?

Phil Thompson phil at riverbankcomputing.com
Thu Mar 4 16:13:18 GMT 2010


On Thu, 4 Mar 2010 15:57:59 +0000, Jugdish <jugdizh at gmail.com> wrote:
> Is there any way to compile SIP so that it uses v2 of its API for things
> like QString, QVariant, QDate, etc.?
> I would rather not do:
> 
> import sip
> sip.setapi('QString', 2)
> 
> at runtime because I can not always guarantee that PyQt4 hasn't been
> imported before I am able to make the above call. Instead, I want to
> forcibly set the API to v2 for our entire site-wide build of SIP. Any way
> to
> do this?

No, but you could add those two lines to PyQt4.__init__.py

Phil


More information about the PyQt mailing list