QwtPlot extends QFrame and QwtPlotDict.
QFrame's __init__ expect up to 2 parameters, and - at least with current pyside - supports cooperative multiple inheritance. this means that internally QFrame.__init__ will call QwtPlotDict.__init__, forwarding all the parameters.
fixes: #74
a (simplified) simulation of the problem:
current:
class QwtPlotDict:
def __init__(self):
print(f'QwtPlotDict.__init__()')
class QFrame:
def __init__(self, *args):
print(f'QFrame.__init__({args})')
super().__init__(*args)
class QwtPlot(QFrame, QwtPlotDict):
def __init__(self, parent = None):
print(f'QwtPlot.__init__({parent})')
QwtPlotDict.__init__(self)
QFrame.__init__(self, parent)
plot = QwtPlot()
with fix:
class QwtPlotDict:
def __init__(self, *_):
print(f'QwtPlotDict.__init__()')
class QFrame:
def __init__(self, *args):
print(f'QFrame.__init__({args})')
super().__init__(*args)
class QwtPlot(QFrame, QwtPlotDict):
def __init__(self, parent = None):
print(f'QwtPlot.__init__({parent})')
super().__init__(parent)
plot = QwtPlot()
QwtPlot
extendsQFrame
andQwtPlotDict
.QFrame
's__init__
expect up to 2 parameters, and - at least with current pyside - supports cooperative multiple inheritance. this means that internallyQFrame.__init__
will callQwtPlotDict.__init__
, forwarding all the parameters.fixes: #74
a (simplified) simulation of the problem:
current:
with fix: