Anyway, what I did was to create a module called 'pyqtconfig' with the following contents:
import sip
sip.setapi('QString', 2)
sip.setapi('QVariant', 2)
sip.setapi('QTextStream', 2)
import PyQt4.Qt
Qt = PyQt4.Qt
Then I simply do 'from pyqtconfig import Qt' in each module. Works like a charm.
(If you want to import each module separately, you need to adapt the above code somewhat. I'll leave that as an exercise for the reader. :)
No comments :
Post a Comment