madgui.widget.dialog module¶
Utilities to create widgets
Classes
|
Utility to wrap an application widget into a window with size-grip and optional buttons, and manage their lifetime via an owner. |
-
class
madgui.widget.dialog.Dialog(owner=None, widget=None, *, parent=None, tight=True)[source]¶ Bases:
PyQt5.QtWidgets.QDialogUtility to wrap an application widget into a window with size-grip and optional buttons, and manage their lifetime via an owner.
We distinguish between an owner and parent widget as follows:
dialogs always stay on top of the parent and share their taskbar entry
dialogs do not stay on top of the owner, nor share their taskbar entry, However: they will be kept alive as long as the owner, and when the owner is closed, will be closed as well.
Methods
closeEvent(self, QCloseEvent)present([raise_])Activate window and bring to front.
setExportWidget(widget, folder)setFontSize(pointsize)setSimpleExportWidget(widget, folder)setWidget(widget, layout)widget()The second option is preferrable for most non-modal windows!
we want to allow the mainwindow in the foreground when focussed
we want to allow choosing between all windows from the taskbar
-
present(raise_=False)¶ Activate window and bring to front.