2012-03-02 02:55:32 +00:00
|
|
|
## Do all Qt imports from here to allow easier PyQt / PySide compatibility
|
|
|
|
|
2012-06-29 18:39:27 +00:00
|
|
|
USE_PYSIDE = False ## If False, import PyQt4. If True, import PySide
|
2012-06-29 19:08:14 +00:00
|
|
|
## Note that when switching between PyQt and PySide, all template
|
|
|
|
## files (*.ui) must be rebuilt for the target library.
|
2012-06-29 18:39:27 +00:00
|
|
|
|
|
|
|
if USE_PYSIDE:
|
|
|
|
from PySide import QtGui, QtCore, QtOpenGL, QtSvg
|
2012-06-29 19:08:14 +00:00
|
|
|
import PySide
|
2012-06-29 18:39:27 +00:00
|
|
|
VERSION_INFO = 'PySide ' + PySide.__version__
|
|
|
|
else:
|
|
|
|
from PyQt4 import QtGui, QtCore
|
|
|
|
try:
|
|
|
|
from PyQt4 import QtSvg
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
try:
|
|
|
|
from PyQt4 import QtOpenGL
|
|
|
|
except ImportError:
|
|
|
|
pass
|
2012-05-11 22:05:41 +00:00
|
|
|
|
2012-03-02 04:23:33 +00:00
|
|
|
QtCore.Signal = QtCore.pyqtSignal
|
2012-06-29 18:39:27 +00:00
|
|
|
VERSION_INFO = 'PyQt4 ' + QtCore.PYQT_VERSION_STR + ' Qt ' + QtCore.QT_VERSION_STR
|