Processing a dialog's red "X" close button

• Feb 20, 2022 - 16:11

How should I process this red X button?

Close.png

The dialog closes as expected but Musescore's Plugin Creator indicates that the plugin is still running, as the Stop button is enabled:

stop.png


Comments

Yes, the plugin is supposed to keep running.
There are some historic raisins on why the plugin creator engine doesn't listen to those close events to terminate the instance.

As for how to process a Close command in a dialog plugin, have a look at this thread where alternatives to Qt.Quit are discussed for "closing" dialog type plugins with a link to a reference commit in which I've demonstrated my approach.

In reply to by jeetee

Thanks. I've read through that thread carefully and have changed my Qt.quit() lines as follows:

qtquit.png

Is this safer? Will it cause any problems, e.g. leaving garbage behind?
It looks as though I can just leave the red X button alone — since the dialogue closes as required, (in which case my Close button is redundant.)

Do you still have an unanswered question? Please log in first to post your question.