import sip from Qt.py
This commit is contained in:
parent
dcbddb0abf
commit
3ce7f58384
@ -3,7 +3,7 @@ import time
|
||||
import weakref
|
||||
import warnings
|
||||
|
||||
from ..Qt import QtCore, QtGui, isQObjectAlive
|
||||
from ..Qt import QtCore, QtGui, QT_LIB, isQObjectAlive
|
||||
from ..Point import Point
|
||||
from .. import functions as fn
|
||||
from .. import ptime as ptime
|
||||
@ -14,15 +14,9 @@ from .. import getConfigOption
|
||||
getMillis = lambda: int(round(time.time() * 1000))
|
||||
|
||||
|
||||
if hasattr(QtCore, 'PYQT_VERSION'):
|
||||
try:
|
||||
try:
|
||||
from PyQt5 import sip
|
||||
except ImportError:
|
||||
import sip
|
||||
HAVE_SIP = True
|
||||
except ImportError:
|
||||
HAVE_SIP = False
|
||||
if QT_LIB.startswith('PyQt'):
|
||||
from ..Qt import sip
|
||||
HAVE_SIP = True
|
||||
else:
|
||||
HAVE_SIP = False
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
from ..Qt import QtGui, QtCore, QT_LIB
|
||||
if QT_LIB in ['PyQt4', 'PyQt5']:
|
||||
try:
|
||||
from PyQt5 import sip
|
||||
except ImportError:
|
||||
import sip
|
||||
if QT_LIB.startswith('PyQt'):
|
||||
from ..Qt import sip
|
||||
from .GraphicsItem import GraphicsItem
|
||||
|
||||
__all__ = ['GraphicsObject']
|
||||
|
@ -1,11 +1,8 @@
|
||||
from ..Qt import QtGui, QtCore, QT_LIB
|
||||
import weakref
|
||||
from .GraphicsObject import GraphicsObject
|
||||
if QT_LIB in ['PyQt4', 'PyQt5']:
|
||||
try:
|
||||
from PyQt5 import sip
|
||||
except ImportError:
|
||||
import sip
|
||||
if QT_LIB.startswith('PyQt'):
|
||||
from ..Qt import sip
|
||||
|
||||
__all__ = ['UIGraphicsItem']
|
||||
class UIGraphicsItem(GraphicsObject):
|
||||
|
@ -1,9 +1,6 @@
|
||||
from ..Qt import QtGui, QtCore, QT_LIB
|
||||
if QT_LIB in ['PyQt4', 'PyQt5']:
|
||||
try:
|
||||
from PyQt5 import sip
|
||||
except ImportError:
|
||||
import sip
|
||||
if QT_LIB.startswith('PyQt'):
|
||||
from ..Qt import sip
|
||||
from .. import multiprocess as mp
|
||||
from .GraphicsView import GraphicsView
|
||||
from .. import CONFIG_OPTIONS
|
||||
|
Loading…
Reference in New Issue
Block a user