Merge pull request #473 from tmtnslt/patch-1

Correct wrong function call in LayoutWidget.addLabel and LayoutWidget…
This commit is contained in:
Ogi Moore 2019-06-07 14:39:12 -07:00 committed by GitHub
commit a838e0267f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):