-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Forms
Igor edited this page Aug 12, 2024
·
2 revisions
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
- Manual testing
- Automatic testing
Translation
Compilation
- Set up developer environment
- Install Qt and Qt Creator
- Get MuseScore's source code
- Install dependencies
- Compile on the command line
- Compile in Qt Creator
Beyond compiling
Misc. development
Architecture general
- Architecture overview
- AppShell
- Modularity
- Interact workflow
- Channels and Notifications
- Settings and Configuration
- Error handling
- Launcher and Interactive
- Keyboard Navigation
Audio
Engraving
- Style settings
- Working with style files
- Style parameter changes for 4.0
- Style parameter changes for 4.1
- Style parameter changes for 4.2
- Style parameter changes for 4.3
- Style parameter changes for 4.4
Extensions
- Extensions overview
- Manifest
- Forms
- Macros
- Api
- Legacy plugin API
Google Summer of Code
References