On Tue, 28 Sep 2010 11:51:06 +0200, "Sybren A. Stüvel" <syb...@stuvel.eu>
wrote:
> Hi folks,
> 
> I'd love to migrate my PyQt application to API 2, especially for the 
> QString class. I'm still using Python 2.x, but I think API 2 feels 
> much more Pythonic. It also will prepare my application for a future 
> port to Python 3. However, when I use sip.setapi('QString', 2) my code 
> seems to become incompatible with Qt Designer. When it tries to load 
> my custom widget plugin, I get this:
> 
>       ValueError: API 'QString' has already been set to version 1
> 
> Is it possible to move to API 2 and still keep using Qt Designer?

Yes, because the code generated by pyuic4 works with both Python2 and
Python3.

You have to make sure that you call setapi() before the very first PyQt
import.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to