Using MuseScore icons set in a plugin UI

• Oct 10, 2021 - 22:31

I'd like to use icons from MuseScore in to my plugins UI.
In my previous plugins I just did copy/paste as PNG and used those PNG. A bit tedious.

Is there any way to use those icon sets in a plugin UI ?

I searched for the Leland font on my MuseScore installation. Couldn't find it.
I searched for .SVG files. Couldn't find any.

I also tried this:
if (Qt.fontFamilies().indexOf('Leland') < 0) {
console.log("Leland not found");

And I couldn't find the font either.


Leland isn't a set of icons, it's a font, so not sure how that would help. But for the record, you can find all fonts and icons used in MsueScore on GitHub along with the full source code.

I haven't tested this but I think it should be possible to use something like
where icon names can be found in this list. In Qt paths prefixed by : mean resources bundled into the executable, and :/data/icons is the default MuseScore's path to search for icons.

In reply to by jeetee

Great. This is what I was looking for.

Actually that's where I started, but stopped when the test whether that font (and the Leland one) was installed answered we "not installed" :-(
if (Qt.fontFamilies().indexOf('Leland') <= 0) { console.log("NOT INSTALLED"); }
While actually QML is knowing them, without them actually be "installed" !!

For anyone looking to use this, the right Unicode characters to use can be found by analyzing the font which is located on the MuseScore font folder on GitHub

Do you still have an unanswered question? Please log in first to post your question.