I have a QDialog object. When the user clicks on the X
button or presses Ctrl+Q
, I want the dialog to go to a minimized view or system tray icon, instead of closing. How do I do that?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
A simple subclass that minimizes instead of closing is the following:
You can test it with this snippet in the interactive interpreter: