diff --git a/examples/PlotAutoRange.py b/examples/PlotAutoRange.py index 35ff72b6..a15f2e3f 100644 --- a/examples/PlotAutoRange.py +++ b/examples/PlotAutoRange.py @@ -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) diff --git a/examples/PlotWidget.py b/examples/PlotWidget.py index 38bbc73c..a3f77b6d 100644 --- a/examples/PlotWidget.py +++ b/examples/PlotWidget.py @@ -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') diff --git a/examples/Plotting.py b/examples/Plotting.py index c3cf8b37..c3831c0a 100644 --- a/examples/Plotting.py +++ b/examples/Plotting.py @@ -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) diff --git a/examples/VideoSpeedTest.py b/examples/VideoSpeedTest.py index ecae3b30..a6c20cb7 100644 --- a/examples/VideoSpeedTest.py +++ b/examples/VideoSpeedTest.py @@ -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() diff --git a/examples/linkedViews.py b/examples/linkedViews.py index 49d68b6e..0a387ddf 100644 --- a/examples/linkedViews.py +++ b/examples/linkedViews.py @@ -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) diff --git a/examples/test_examples.py b/examples/test_examples.py index 2a1c450a..ba1037ad 100644 --- a/examples/test_examples.py +++ b/examples/test_examples.py @@ -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, diff --git a/pyqtgraph/__init__.py b/pyqtgraph/__init__.py index 49b918d9..71a8662c 100644 --- a/pyqtgraph/__init__.py +++ b/pyqtgraph/__init__.py @@ -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.