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