Hi,
Please is there an adapter for listening close document ?
Thanks in adavance
Close document listener
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Re: Close document listener
If you want to get notified when user requested to close a document window (but can still cancel the close dialog), you can use the closeRequested signal of RMdiChild:
If you want to get notified when a document is definitely about to close and be destroyed, use signal closeAccepted instead.
Code: Select all
var mdiChild = EAction.getMdiChild();
mdiChild.closeRequested.connect(myFunction);
function myFunction(mdiChild) {
var di = mdiChild.getDocumentInterface();
...
}
Re: Close document listener
Thanks