code: def __init__(self, parent, title, message, btn1_text, btn2_text):
      super().__init__(parent)
      self.setWindowTitle(title)
      msg_lab = QLabel(message)
      self.res = None
      self.btn1 = QRadioButton(btn1_text)
      self.btn2 = QRadioButton(btn2_text)
      self.btngroup = QButtonGroup()
      self.btngroup.addButton(self.btn1)
      self.btngroup.addButton(self.btn2)
      button_box = QDialogButtonBox(
          QDialogButtonBox.Ok | QDialogButtonBox.Cancel
      )
      # 绑定按钮事件
      self.btngroup.buttonClicked.connect(self._check)
      button_box.accepted.connect(self.accept)
      button_box.rejected.connect(self.reject)
      # 将按钮添加到布局
      layout = QVBoxLayout(self)
      layout.addWidget(msg_lab)
      layout.addWidget(self.btn1)
      layout.addWidget(self.btn2)
      layout.addWidget(button_box)
      self.setLayout(layout)
  
imports: from qtpy.QtWidgets import QDialog, QLabel, QRadioButton, QButtonGroup, QDialogButtonBox, QVBoxLayout
label_desc: Use image node_id 1 to create a new CustomDialog object from inherited base classes: QDialog with example: obj = CustomDialog(parent, title, message, btn1_text, btn2_text)