Merge pull request #1840 from jennifer-manriquez/master

Allow border=False in GraphicsLayout
This commit is contained in:
Ogi Moore 2021-06-16 20:17:35 -07:00 committed by GitHub
commit ba517aba0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,11 +13,12 @@ class GraphicsLayout(GraphicsWidget):
This is usually created automatically as part of a :class:`GraphicsWindow <pyqtgraph.GraphicsWindow>` or :class:`GraphicsLayoutWidget <pyqtgraph.GraphicsLayoutWidget>`. This is usually created automatically as part of a :class:`GraphicsWindow <pyqtgraph.GraphicsWindow>` or :class:`GraphicsLayoutWidget <pyqtgraph.GraphicsLayoutWidget>`.
""" """
def __init__(self, parent=None, border=None): def __init__(self, parent=None, border=None):
GraphicsWidget.__init__(self, parent) GraphicsWidget.__init__(self, parent)
if border is True: if border is True:
border = (100,100,100) border = (100,100,100)
elif border is False:
border = None
self.border = border self.border = border
self.layout = QtGui.QGraphicsGridLayout() self.layout = QtGui.QGraphicsGridLayout()
self.setLayout(self.layout) self.setLayout(self.layout)