Skip to content

Commit 01c2cfb

Browse files
committedMar 15, 2016
pyqtwrapper: set sip api to 2 for PyQt.QtCore for Qt4
(followup fb3fcfa)
1 parent 567a323 commit 01c2cfb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎python/PyQt/PyQt4/QtCore.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@
2323
# This will get replaced with a git SHA1 when you do a git archive
2424
__revision__ = '$Format:%H$'
2525

26+
import sip
27+
28+
try:
29+
apis = ["QDate", "QDateTime", "QString", "QTextStream", "QTime", "QUrl", "QVariant"]
30+
for api in apis:
31+
sip.setapi(api, 2)
32+
except ValueError:
33+
# API has already been set so we can't set it again.
34+
pass
35+
2636
from PyQt4.QtCore import *
2737
from PyQt4.QtGui import QItemSelectionModel, QSortFilterProxyModel
2838

0 commit comments

Comments
 (0)