code: def __init__(
      self,
      text="Enter object label",
      parent=None,
      ocr=None,
      mImgList=None,
      lenbar=0,
  ):
      super(AutoDialog, self).__init__(parent)
      self.setFixedWidth(1000)
      self.parent = parent
      self.ocr = ocr
      self.mImgList = mImgList
      self.lender = lenbar
      self.pb = QProgressBar()
      self.pb.setRange(0, self.lender)
      self.pb.setValue(0)
  
      layout = QVBoxLayout()
      layout.addWidget(self.pb)
      self.model = "paddle"
      self.listWidget = QListWidget(self)
      layout.addWidget(self.listWidget)
  
      self.buttonBox = bb = BB(BB.Ok | BB.Cancel, Qt.Horizontal, self)
      bb.button(BB.Ok).setIcon(newIcon("done"))
      bb.button(BB.Cancel).setIcon(newIcon("undo"))
      bb.accepted.connect(self.validate)
      bb.rejected.connect(self.reject)
      layout.addWidget(bb)
      bb.button(BB.Ok).setEnabled(False)
  
      self.setLayout(layout)
      # self.setWindowTitle("自动标注中")
      self.setWindowModality(Qt.ApplicationModal)
  
      # self.setWindowFlags(Qt.WindowCloseButtonHint)
  
      self.thread_1 = Worker(
          self.ocr, self.mImgList, self.parent, "paddle"
      )
      self.thread_1.progressBarValue.connect(
          self.handleProgressBarSingal
      )
      self.thread_1.listValue.connect(self.handleListWidgetSingal)
      self.thread_1.endsignal.connect(self.handleEndsignalSignal)
      self.time_start = time.time()
  
imports: import time
  import datetime
  import json
  import cv2
  import numpy
  from libs.utils import newIcon
label_desc: Use image node_id 1 to create a new AutoDialog object from inherited base classes: QDialog with example: obj = AutoDialog(text, parent, ocr, mImgList, lenbar)