Skip to content

Updating plugins for MuseScore Studio 4.4

mirabilos edited this page Sep 19, 2024 · 12 revisions

MuseScore Studio 4.4 uses basically the same plugin framework as 4.3 and before, but some slight changes were inevitable.

Muse(Score) modules

Some imports have been renamed:

Before After
MuseScore.Ui Muse.Ui
MuseScore.UiComponents Muse.UiComponents

Qt modules

Since MuseScore Studio has switched to Qt 6, the long-deprecated QtQuick.Controls 1 module has been removed. Use the QtQuick.Controls 2 module instead; documentation can be found on the Qt website. Another alternative would be to use Muse.UiComponents, although these have a less stable API and no documentation other than MuseScore Studio's own source code.

Examples

For inspiration, you can look how we updated the "built-in" plugins for Qt 6: https://github.com/musescore/MuseScore/commits/7fe32bacbc9287b716d40462afb713da52bbde97/share/plugins?since=2024-02-20&until=2024-02-21

Plugin title etc.

MuseScore Studio 4.4 contains some changes about how plugins are parsed; setting the title etc. via Component.onCompleted doesn't work anymore because of this.

For plugins that target MSS4.4 only, you can use

    title: "Some Title"
    thumbnailName: "some_thumbnail.png"
    categoryCode: "some_category"

For plugins that are also supposed to work with earlier versions, you can use special //4.4 comments, like this:

    //4.4 title: "Some Title"
    //4.4 thumbnailName: "some_thumbnail.png"
    //4.4 categoryCode: "some_category"
    Component.onCompleted: {
        if (mscoreMajorVersion == 4 && mscoreMinorVersion <= 3) {
            // for MS4.0-4.3
            title = "Some Title";
            thumbnailName = "some_thumbnail.png";
            categoryCode = "some_category";
        }
    }

We apologise for this inconvenience; MuseScore's plugins/extensions framework is undergoing a big transition, in order to be more stable, usable, and comprehensive in the future.

Clone this wiki locally