Insert a horizontal line below system
Hi, I'm trying to insert horizontal lines below the note systems. Something like "Pedal" or "Line" in the palette. But I don't know how to create them with plugin code. I tried:
let e = newElement(Element.TEXTLINE) // Element.PEDAL also works
I got/guessed the element types from here.
Looks like these span elements can somehow connected to start and end chords. But before I fiddle around for hours, can someone give me a hint?
- Of which class is the line of element type PEDAL/TEXTLINE?
- Do I have to call
startChord.add(e); endChord.add(e)
or where do I have to add the line? - Is there anything else to consider?
Comments
Actually MuseScore currently lacks an API for working with spanners from plugins, see #118231: QML spanners are not exposed to plugins. So there is probably no good way to add a line without expanding plugin API.
In reply to Actually MuseScore currently… by dmitrio95
Alright, so that feature has to wait in my plugin... Thank you!