-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
running python -m examples (or python -m pyqtgraph.examples depending on how you have installed pyqtgraph) will result in an error
pyqtgraph-pyqt ❯ python -m examples
Traceback (most recent call last):
File "/Users/ogi/.zinit/plugins/pyenv---pyenv/versions/miniconda2-latest/envs/pyqtgraph-pyqt/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/ogi/.zinit/plugins/pyenv---pyenv/versions/miniconda2-latest/envs/pyqtgraph-pyqt/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/ogi/Developer/pyqtgraph/examples/__main__.py", line 159, in <module>
run()
File "/Users/ogi/Developer/pyqtgraph/examples/__main__.py", line 154, in run
app = App([])
File "/Users/ogi/Developer/pyqtgraph/examples/__main__.py", line 28, in __init__
super().__init__(*args, **kwargs)
TypeError: super() takes at least 1 argument (0 given)
This is in __main__.py
class App(QtGui.QApplication):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.paletteChanged.connect(self.onPaletteChange)There are two issues, one is the super() call, which we can easily work around with super(QtGui.QApplication, self). The second line in __init__ is a bit more troublesome, as paletteChanged is a signal present in QGuiApplication in Qt5, but as far as I can tell, there is no equivalent signal in Qt4. This should likely be implemented by safely checking if paletteChanged is an attribute of the super-class.
Reactions are currently unavailable