Skip to content
Igor edited this page Aug 12, 2024 · 2 revisions

Extension Forms

In progress

Forms are extensions that have a user interface. To create UI, Qml is used. For form extensions, we need to specify the appropriate type and file name using .qml in the extension manifest.
Like this:
manifest.json

{
    "uri": "musescore://extensions/example1",
    "type": "form",
    ...

    "main": "main.qml"
}

To create a UI, use ExtensionBlank as the root element. For this we need to do import MuseApi.Extensions 1.0. Example of a simple interface:

import QtQuick

import MuseApi.Extensions 1.0
import MuseApi.Controls 1.0

ExtensionBlank {

    id: root

    implicitHeight: 400
    implicitWidth: 400

    color: api.theme.backgroundPrimaryColor

    Component.onCompleted: {
        api.log.info("Component.onCompleted from example1")
    }

    StyledTextLabel {
        id: label1
        text: "This is example1"
    }

    FlatButton {
        id: btn1
        anchors.top: label1.bottom

        text: "Click me"

        onClicked: {
            api.interactive.info("Example1", "Clicked on Btn1")
        }
    }
}

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