Accessing Note Head Group Enum in QML
I'm working on a simple plugin to convert note heads according to the seven-shape system. Looking at the Note class on Github, I see that a headGroup property is exposed. How do I access the Group enum in QML to change its value?
I tried just assigning the integer values of the enum, but I get the error "Cannot assign int to Ms::NoteHead::Group".
Comments
Assign a valid enum instead, like HEAD_MI, HEAD_DO, etc?
In reply to Assign a valid enum instead, by Jojo-Schmitz
Right. I need to know how to access those valid enum values in QML.
I would expect something like note.headGroup = headGroup.HEAD_MI or note.headGroup = Note.Group.HEAD_MI (guesses based off of looking at the Note and QmlPlugin classes) to work. I have tried just HEAD_MI, HEAD_DO, etc... as well. I'm looking for how those enum values are exposed.
In reply to Right. I need to know how to by hoffmaestro
In case you were still looking for this, use
NoteHead.HEAD_DO
from within your QML code.See the code from the shape notes plugin as an example.