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
This commit is contained in:
parent
dd5a8bf9d1
commit
9a05b74f25
@ -39,7 +39,7 @@ class LayoutWidget(QtGui.QWidget):
|
|||||||
Returns the created widget.
|
Returns the created widget.
|
||||||
"""
|
"""
|
||||||
text = QtGui.QLabel(text, **kargs)
|
text = QtGui.QLabel(text, **kargs)
|
||||||
self.addItem(text, row, col, rowspan, colspan)
|
self.addWidget(text, row, col, rowspan, colspan)
|
||||||
return text
|
return text
|
||||||
|
|
||||||
def addLayout(self, row=None, col=None, rowspan=1, colspan=1, **kargs):
|
def addLayout(self, row=None, col=None, rowspan=1, colspan=1, **kargs):
|
||||||
@ -49,7 +49,7 @@ class LayoutWidget(QtGui.QWidget):
|
|||||||
Returns the created widget.
|
Returns the created widget.
|
||||||
"""
|
"""
|
||||||
layout = LayoutWidget(**kargs)
|
layout = LayoutWidget(**kargs)
|
||||||
self.addItem(layout, row, col, rowspan, colspan)
|
self.addWidget(layout, row, col, rowspan, colspan)
|
||||||
return layout
|
return layout
|
||||||
|
|
||||||
def addWidget(self, item, row=None, col=None, rowspan=1, colspan=1):
|
def addWidget(self, item, row=None, col=None, rowspan=1, colspan=1):
|
||||||
|
Loading…
Reference in New Issue
Block a user