initExample.py 506 Bytes
Newer Older
Luke Campagnola's avatar
Luke Campagnola committed
1
2
## make this version of pyqtgraph importable before any others
import sys, os
Luke Campagnola's avatar
Luke Campagnola committed
3
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
4
5

if 'pyside' in sys.argv:  ## should force example to use PySide instead of PyQt
6
    from PySide import QtGui
7
elif 'pyqt' in sys.argv: 
8
9
10
11
12
13
14
15
16
    from PyQt4 import QtGui
else:
    from pyqtgraph.Qt import QtGui
    
for gs in ['raster', 'native', 'opengl']:
    if gs in sys.argv:
        QtGui.QApplication.setGraphicsSystem(gs)
        break