diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py index d61e073af..925250405 100644 --- a/qt/aqt/__init__.py +++ b/qt/aqt/__init__.py @@ -130,7 +130,18 @@ class DialogManager: self, name: str, creator: Union[Callable, type], instance: Optional[Any] = None ): """Allows add-ons to register a custom dialog to be managed by Anki's dialog - manager + manager, which ensures that only one copy of the window is open at once, + and that the dialog cleans up asynchronously when the collection closes + + Please note that dialogs added in this manner need to define a close behavior + by either: + + - setting `dialog.silentlyClose = True` to have it close immediately + - define a `dialog.closeWithCallback()` method that is called when closed + by the dialog manager + + TODO?: Implement more restrictive type check to ensure these requirements + are met Arguments: name {str} -- Name/identifier of the dialog in question