code: def __init__(self):
      QWidget.__init__(self, None)
  
      self.setMinimumSize(600, 400)
  
      # Create two labels and a button
      self.vertLabel = QLabel("Vertex code", self)
      self.fragLabel = QLabel("Fragment code", self)
      self.theButton = QPushButton("Compile!", self)
      self.theButton.clicked.connect(self.on_compile)
  
      # Create two editors
      self.vertEdit = TextField(self)
      self.vertEdit.setPlainText(VERT_CODE)
      self.fragEdit = TextField(self)
      self.fragEdit.setPlainText(FRAG_CODE)
  
      # Create a canvas
      self.canvas = Canvas(parent=self)
  
      # Layout
      hlayout = QHBoxLayout(self)
      self.setLayout(hlayout)
      vlayout = QVBoxLayout()
      #
      hlayout.addLayout(vlayout, 1)
      hlayout.addWidget(self.canvas.native, 1)
      #
      vlayout.addWidget(self.vertLabel, 0)
      vlayout.addWidget(self.vertEdit, 1)
      vlayout.addWidget(self.fragLabel, 0)
      vlayout.addWidget(self.fragEdit, 1)
      vlayout.addWidget(self.theButton, 0)
  
      self.show()
  
file_path: vispy/examples/demo/gloo/glsl_sandbox_cube.py
imports: import numpy
  from vispy import app, gloo
  from vispy.io import read_mesh, load_data_file, load_crate
  from vispy.util.transforms import perspective, translate, rotate
label_desc: Use image node_id 1 to create a new MainWindow object from inherited base classes: QWidget with example: obj = MainWindow()