A simple subclass that collapses instead of closing is this:
class MyDialog(QtGui.QDialog):
You can test it with this snippet in the interactive interpreter:
>>> from PyQt4 import QtCore, QtGui >>> app = QtGui.QApplication([]) >>> win = MyDialog() >>> win.show() >>> app.exec_()
Bakuriu
source share