Processing a dialog's red "X" close button
How should I process this red X button?
The dialog closes as expected but Musescore's Plugin Creator indicates that the plugin is still running, as the Stop button is enabled:
How should I process this red X button?
The dialog closes as expected but Musescore's Plugin Creator indicates that the plugin is still running, as the Stop button is enabled:
Do you still have an unanswered question? Please log in first to post your question.
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 Yes, the plugin is supposed… by jeetee
Thanks. I've read through that thread carefully and have changed my Qt.quit() lines as follows:
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.)
In reply to Thanks. I've read through… by yonah_ag
All enabled Plugins are instantiated at the moment of enabling them (which usually is when MuseScore launches) and are cleaned up when the Plugin Engine quits (which is at a Qt.quit() call or at program end).