Elaborate.py 740 B

1234567891011121314151617181920
  1. import threading
  2. from PySide2.QtWidgets import *
  3. from PySide2.QtCore import *
  4. from PySide2.QtGui import *
  5. from ui.ui_Elaborate import Ui_Elaborate
  6. class Elaborate(Ui_Elaborate, QDialog):
  7. def __init__(self, mainWindow) -> None:
  8. super().__init__(mainWindow)
  9. self.setupUi(self)
  10. self.btn_OK.clicked.connect(self.click_ok)
  11. self.mainWin = mainWindow
  12. self.move(mainWindow.x()+(mainWindow.width()-self.width())/2,mainWindow.y()+(mainWindow.height()-self.height())/2)
  13. def click_ok(self):
  14. top = self.top_edit.text()
  15. bbox = self.checkBox.isChecked()
  16. thread = threading.Thread(target=self.mainWin.GUI.Elaborate, args=(top,bbox,))
  17. thread.start()
  18. self.close()