About 2,850,000 results
Open links in new tab
  1. python - Proper way to quit/exit a PyQt program - Stack Overflow

    The latter will terminate the program, but the former will merely terminate the event-loop (if it's running). When the user cancels the login dialog, your example should just call sys.exit() to terminate the program.

  2. python - How to stop running PyQt5 program without closing the GUI ...

    The following code pings a website and prints the result in QTextEdit. One button "Run" is used to start the ping. I want to have another button "End", which could stop the ping process while it is running without closing the GUI. But currently, the "End" button closes the whole GUI window.

  3. python - How to properly terminate a QThread from a GUI application ...

    Oct 28, 2011 · I deleted all the def stop(self) code in the thread and the def on_abort_clicked(self) code in the GUI, and rewrote it. I simply put self.terminate() in the thread's stop() function and did self.thread.stop() in the GUI class.

  4. [SOLVED] Proper handling of QThread on main window close - Qt

    May 7, 2015 · When the application is closed if any threads are still running the close event is ignored and the threads are shutdow (cleanly) at that point. The closeEvent () is refired using a QTimer after a short delay and keeps doing this until all threads are stopped.

  5. Stopping Main Gui and worker thread before completion for PyQt5 - Qt

    May 6, 2021 · When pressing the STOP button, I want add the ability closing everything before completion if necessary: Closing the gui window, shutting down the ongoing processes created by the Worker thread.

  6. Qt close event with Python issue - Qt Forum

    Jun 18, 2019 · I want to intercept close event in my program. The problem when I press the X button it closes omitting close event. Nothing is printed to the console. Thanks in advance for your help. def closeEvent (self, event): event. ignore () print ("Test...")

  7. Clean up on exit application — Create GUI applications with Python

    Oct 1, 2020 · I have just solved this with the following solution. in my ui class (that inherites from a designer ui py file) I placed this function to catch the close event and issue a kill all to my worker managers (one set are providing a camera snapshot feed and the other is inference engines):

  8. [PyQt5] Application will not quit when window is closed - Reddit

    Jun 28, 2020 · Your clicked() method should just be: def clicked(self): self.win2 = ChooseGameUI() self.win2.show() From the docs: For any GUI application using Qt, there is precisely one QApplication object, no matter whether the application has 0, 1, 2 or more windows at any given time.

  9. Pause a running worker thread - Python GUIs

    May 10, 2020 · Normally if your worker will be waiting a long time you should just stop and start a new worker later. But if you do want it to wait, you can put it in a wait loop (while self.waiting==True: time.sleep(0.1)) and update the value of …

  10. Qt Application does not exit when the last UI is closed manually

    Dec 11, 2020 · Attempt to close the window by pressing the "Close" item in the menu does make the window invisible, but the Python process is still blocking. The expectation is that it should behave like the "OK" button and the Python process should exit.

  11. Some results have been removed
Refresh