Plugin changes for version 4.4

• Sep 26, 2024 - 15:34

I would like to make a small contribution to those who have difficulty rewriting the plugins created for version 3.6 to make them functional in version 4.4

Obviously what I will write is related to the plugins I created and therefore I do not pretend to be able to exhaust the topic.

The changes to be made are essentially these:
1) 'Qt.quit()' must be replaced with 'quit()'
2) Delete the 'import QtQuick.Dialogs' line, if it exists: the visual plugins obviously create a dialog box themselves
3) Delete the 'menuPath' line, and add the 'title', 'categoryCode', 'pluginType' lines, according to methods already described in other posts.
4) Add (if it is provided by the plugin) the 'width' and 'height' dimensions of the main window after the 'requiresScore: true' line, and eliminate the object itself (the main window) and its call in 'onRun', but not any objects contained in it (Button, ComboBox, etc.). You can safely leave the child windows (if any) based on the 'Window' object, making 'visible: false'.
That's all.

I want to add just one last thing: I read somewhere that it would be necessary to replace the 'TextField' object, but frankly I don't see the need; However, it may not work on some systems.
In this regard I will say that text boxes, in general, can validly remedy the circumstance that plugins can no longer maintain focus, thus making any keyboard interactions, such as 'shortcuts', non-functional. The text box can maintain focus and therefore it is possible to pass messages coming from the keyboard through there. This is perhaps an unprofessional solution, but it works: the question remains why the Musescore developers made this choice.

However, I conclude with my thanks to those who created this wonderful program, and apologizing for my probably somewhat limping English.


Comments

  1. Was true for 3.x to 4.0 already, not new for 4.4 at all.
  2. Are you sure about plugins creating those dialogs without that import?
  3. Deleting the menuParth is not needed, and not wanted when wanting to maintain compatibility with 3.x

In reply to by Jojo-Schmitz

Thanks for the contribution.
1. I take note: I assumed that version 4.4 had the same problem as versions 4 onwards. If so, so much the better, with less work to do.
2. No, I'm not sure: I probably explained myself badly. I meant that the plugin creates a window (call it whatever you want) without the need for an explicit declaration of the 'window' component: otherwise, since it is sufficient to declare 'width' and 'height' who creates the window? You tell me.
3. It's true, it's not necessary, but it's useless to leave it if the plugin is intended for version 4.4 only. Personally, I continue to create and modify plugins with version 3.6 (which has the compiler) and then create exclusive versions for the new version; I'm not interested in wasting time trying to create universal versions.
In any case, any addition or comment to what I have written is always welcome: as I said, I do not claim to know or be able to exhaust the topic.

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