glue.utils.qt.process_dialog(delay=0, accept=False, reject=False, function=None)[source]

Context manager to automatically capture the active dialog and carry out certain actions.

Note that only one of accept, reject, or function should be specified.

delayint, optional

The delay in ms before acting on the dialog (since it may not yet exist when the context manager is called).

acceptbool, optional

If True, accept the dialog after the specified delay.

rejectbool, optional

If False, reject the dialog after the specified delay

functionfunc, optional

For more complex user actions, specify a function that takes the dialog as the first and only argument.