...
The window for which we want to catch the close event. This has to be qwidget or qmainwindow.
cmds
Tcl statements to be executed when the window closes. This will often be the name of a Tcl procedure. If the procedure returns the string 'ignore' the event is cancelled, and the window will remain visible.
...