diff --git a/app.py b/app.py index 3edbe27..ef34f30 100644 --- a/app.py +++ b/app.py @@ -897,7 +897,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.robotClient.add_sendQuene(request_command) def show_messagebox_of_person(self): - # Create a QMessageBox + msg_box = QMessageBox(self) msg_box.setWindowTitle("提示") msg_box.setText("当前有人是否继续") @@ -905,15 +905,15 @@ class MainWindow(QMainWindow, Ui_MainWindow): msg_box.setStandardButtons(QMessageBox.Yes) msg_box.setDefaultButton(QMessageBox.Yes) - # Execute the dialog and capture the result + result = msg_box.exec() - # Check the result and set the variable accordingly + if result == QMessageBox.Yes: self.feeding.pause = False self.send_pause_command(False) - print(f"Variable value: {self.variable}") + if __name__ == "__main__":