code: def create_dialog(self):
          
          self.bbox = QDialogButtonBox(QDialogButtonBox.Close)
          self.idx_close = self.bbox.button(QDialogButtonBox.Close)
          self.idx_close.pressed.connect(self.reject)
  
          btnlayout = QHBoxLayout()
          btnlayout.addStretch(1)
          btnlayout.addWidget(self.bbox)
  
          layout = QVBoxLayout()
          layout.addWidget(self.toolbar)
          layout.addWidget(self.canvas)
          layout.addLayout(btnlayout)
          layout.addStretch(1)
          self.setLayout(layout)
docs: Create the basic dialog.