This commit is contained in:
Kovid Goyal 2015-04-20 08:03:58 +05:30
parent aaeddce186
commit d2d8108e7c

View File

@ -134,6 +134,17 @@ class RightClickButton(QToolButton):
class Dialog(QDialog):
'''
An improved version of Qt's QDialog class. This automatically remembers the
last used size, automatically connects the signals for QDialogButtonBox,
automatically sets the window title and if the dialog has an object names
splitter, automatically saves the splitter state.
In order to use it, simply subclass an implement setup_ui(). You can also
implement sizeHint() to give the dialog a different default size when shown
for the first time.
'''
def __init__(self, title, name, parent=None, prefs=gprefs):
QDialog.__init__(self, parent)
self.prefs_for_persistence = prefs