Bug in RawImageWidget.py

For example: it prevents integration of this widget to Enaml.
This commit is contained in:
kiwi0fruit 2017-06-22 16:00:54 +07:00 committed by GitHub
parent 53a3087e33
commit 8a40c22848

View File

@ -21,7 +21,7 @@ class RawImageWidget(QtGui.QWidget):
"""
Setting scaled=True will cause the entire image to be displayed within the boundaries of the widget. This also greatly reduces the speed at which it will draw frames.
"""
QtGui.QWidget.__init__(self, parent=None)
QtGui.QWidget.__init__(self, parent)
self.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding))
self.scaled = scaled
self.opts = None
@ -69,7 +69,7 @@ if HAVE_OPENGL:
Perfomance varies between platforms; see examples/VideoSpeedTest for benchmarking.
"""
def __init__(self, parent=None, scaled=False):
QtOpenGL.QGLWidget.__init__(self, parent=None)
QtOpenGL.QGLWidget.__init__(self, parent)
self.scaled = scaled
self.image = None
self.uploaded = False