Skip to content

Updating plugins for MuseScore Studio 4.4

Parking B edited this page Oct 30, 2024 · 6 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.

Qt.labs.settings

The Settings module is now included in the Musescore module. The explicit import of Qt.labs.settings 1.0 must be removed. It leads to an "Module "Qt.labs.settings" is not installed" error and is not required for the Settings module to work.

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";
        }
    }

More info

See "Plugins for 4.x" in the Developers' Handbook for more tricks, advices and observations on porting plugin's to MU4.4

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.

Testing

Translation

Compilation

  1. Set up developer environment
  2. Install Qt and Qt Creator
  3. Get MuseScore's source code
  4. Install dependencies
  5. Compile on the command line
  6. Compile in Qt Creator

Beyond compiling

  1. Find your way around the code
  2. Submit a Pull Request
  3. Fix the CI checks

Misc. development

Architecture general

Audio

Engraving

Extensions

Google Summer of Code

References

Clone this wiki locally