From 9a05b74f250647bb4020c2866532210ff9174104 Mon Sep 17 00:00:00 2001 From: Lorenz Drescher Date: Fri, 21 Apr 2017 17:41:22 +0200 Subject: [PATCH] Correct wrong function call in LayoutWidget.addLabel and LayoutWidget.addLayout Previously LayoutWidget.addLabel and LayoutWidget.addLayout called a function "addItem", that didn't exist. Corrected to call LayoutWidget.addWidget. This fixes #242 --- pyqtgraph/widgets/LayoutWidget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/widgets/LayoutWidget.py b/pyqtgraph/widgets/LayoutWidget.py index 65d04d3f..7181778d 100644 --- a/pyqtgraph/widgets/LayoutWidget.py +++ b/pyqtgraph/widgets/LayoutWidget.py @@ -39,7 +39,7 @@ class LayoutWidget(QtGui.QWidget): Returns the created widget. """ text = QtGui.QLabel(text, **kargs) - self.addItem(text, row, col, rowspan, colspan) + self.addWidget(text, row, col, rowspan, colspan) return text def addLayout(self, row=None, col=None, rowspan=1, colspan=1, **kargs): @@ -49,7 +49,7 @@ class LayoutWidget(QtGui.QWidget): Returns the created widget. """ layout = LayoutWidget(**kargs) - self.addItem(layout, row, col, rowspan, colspan) + self.addWidget(layout, row, col, rowspan, colspan) return layout def addWidget(self, item, row=None, col=None, rowspan=1, colspan=1):