remove calls to setGraphicsSystem
in fact all are no-ops
This commit is contained in:
parent
e09a397ebc
commit
61616ffad9
@ -11,7 +11,6 @@ from pyqtgraph.Qt import QtGui, QtCore
|
||||
import numpy as np
|
||||
import pyqtgraph as pg
|
||||
|
||||
#QtGui.QApplication.setGraphicsSystem('raster')
|
||||
app = pg.mkQApp("Plot Auto Range Example")
|
||||
#mw = QtGui.QMainWindow()
|
||||
#mw.resize(800,800)
|
||||
|
@ -12,7 +12,6 @@ from pyqtgraph.Qt import QtGui, QtCore
|
||||
import numpy as np
|
||||
import pyqtgraph as pg
|
||||
|
||||
#QtGui.QApplication.setGraphicsSystem('raster')
|
||||
app = pg.mkQApp()
|
||||
mw = QtGui.QMainWindow()
|
||||
mw.setWindowTitle('pyqtgraph example: PlotWidget')
|
||||
|
@ -12,7 +12,6 @@ from pyqtgraph.Qt import QtGui, QtCore
|
||||
import numpy as np
|
||||
import pyqtgraph as pg
|
||||
|
||||
#QtGui.QApplication.setGraphicsSystem('raster')
|
||||
app = pg.mkQApp("Plotting Example")
|
||||
#mw = QtGui.QMainWindow()
|
||||
#mw.resize(800,800)
|
||||
|
@ -40,7 +40,6 @@ parser.add_argument('--lut-alpha', default=False, action='store_true', help="Use
|
||||
parser.add_argument('--size', default='512x512', type=lambda s: tuple([int(x) for x in s.split('x')]), help="WxH image dimensions default='512x512'")
|
||||
args = parser.parse_args(sys.argv[1:])
|
||||
|
||||
#QtGui.QApplication.setGraphicsSystem('raster')
|
||||
app = pg.mkQApp("Video Speed Test Example")
|
||||
|
||||
win = QtGui.QMainWindow()
|
||||
|
@ -12,7 +12,6 @@ from pyqtgraph.Qt import QtGui, QtCore
|
||||
import numpy as np
|
||||
import pyqtgraph as pg
|
||||
|
||||
#QtGui.QApplication.setGraphicsSystem('raster')
|
||||
app = pg.mkQApp("Linked Views Example")
|
||||
#mw = QtGui.QMainWindow()
|
||||
#mw.resize(800,800)
|
||||
|
@ -199,7 +199,7 @@ conditionalExamples = {
|
||||
)
|
||||
]
|
||||
)
|
||||
def testExamples(frontend, f, graphicsSystem=None):
|
||||
def testExamples(frontend, f):
|
||||
# runExampleFile(f[0], f[1], sys.executable, frontend)
|
||||
|
||||
name, file = f
|
||||
@ -210,15 +210,11 @@ def testExamples(frontend, f, graphicsSystem=None):
|
||||
sys.stdout.flush()
|
||||
import1 = "import %s" % frontend if frontend != '' else ''
|
||||
import2 = os.path.splitext(os.path.split(fn)[1])[0]
|
||||
graphicsSystem = (
|
||||
'' if graphicsSystem is None else "pg.QtGui.QApplication.setGraphicsSystem('%s')" % graphicsSystem
|
||||
)
|
||||
code = """
|
||||
try:
|
||||
%s
|
||||
import initExample
|
||||
import pyqtgraph as pg
|
||||
%s
|
||||
import %s
|
||||
import sys
|
||||
print("test complete")
|
||||
@ -231,7 +227,7 @@ except:
|
||||
print("test failed")
|
||||
raise
|
||||
|
||||
""" % (import1, graphicsSystem, import2)
|
||||
""" % (import1, import2)
|
||||
if sys.platform.startswith('win'):
|
||||
process = subprocess.Popen([sys.executable],
|
||||
stdin=subprocess.PIPE,
|
||||
|
@ -37,9 +37,7 @@ if 'linux' in sys.platform: ## linux has numerous bugs in opengl implementation
|
||||
elif 'darwin' in sys.platform: ## openGL can have a major impact on mac, but also has serious bugs
|
||||
useOpenGL = False
|
||||
if QtGui.QApplication.instance() is not None:
|
||||
print('Warning: QApplication was created before pyqtgraph was imported; there may be problems (to avoid bugs, call QApplication.setGraphicsSystem("raster") before the QApplication is created).')
|
||||
if QtGui.QApplication.setGraphicsSystem:
|
||||
QtGui.QApplication.setGraphicsSystem('raster') ## work around a variety of bugs in the native graphics system
|
||||
print('Warning: QApplication was created before pyqtgraph was imported; there may be problems.')
|
||||
else:
|
||||
useOpenGL = False ## on windows there's a more even performance / bugginess tradeoff.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user