class_docstr: Subclass of QGroupBox that implements collapse handle.
      
class_docstr_tok: ["Subclass","of","QGroupBox","that","implements","collapse","handle","."]
code: def __init__(self, *args):
      QtWidgets.QGroupBox.__init__(self, *args)
  
      self._collapsed = False
      # We modify the size policy when the group box is collapsed, so
      # keep track of the last requested policy:
      self._lastSizePlocy = self.sizePolicy()
  
      self.closePath = QtGui.QPainterPath()
      self.closePath.moveTo(0, -1)
      self.closePath.lineTo(0, 1)
      self.closePath.lineTo(1, 0)
      self.closePath.lineTo(0, -1)
  
      self.openPath = QtGui.QPainterPath()
      self.openPath.moveTo(-1, 0)
      self.openPath.lineTo(1, 0)
      self.openPath.lineTo(0, 1)
      self.openPath.lineTo(-1, 0)
  
      self.collapseBtn = PathButton(
          path=self.openPath, size=(12, 12), margin=0
      )
      self.collapseBtn.setStyleSheet(
          """
              border: none;
          """
      )
      self.collapseBtn.setPen("k")
      self.collapseBtn.setBrush("w")
      self.collapseBtn.setParent(self)
      self.collapseBtn.move(3, 3)
      self.collapseBtn.setFlat(True)
  
      self.collapseBtn.clicked.connect(self.toggleCollapsed)
  
      if len(args) > 0 and isinstance(args[0], str):
          self.setTitle(args[0])
  
file_path: pyqtgraph/pyqtgraph/widgets/GroupBox.py
imports: from ..Qt import QtCore, QtGui, QtWidgets
  from .PathButton import PathButton
label_desc: Use image node_id 1 to create a new GroupBox object from inherited base classes: QtWidgets with example: obj = GroupBox()