Offset/pos values of slurs always return 0?
In my tests so far, I’ve found that slur.offsetX, slur.offsetY, slur.posX and slur.posY all return 0, regardless of what the 'Offset' values in the Properties pane read. (I've checked that my variable slur contains a valid slur object).
Anyone know how to get the offset measurements of a slur?
Comments
I think you are looking for these properties: slurUoff1, slurUoff2, slurUoff3, slurUoff4, which contain a QPoint value (e.g. slurUoff1.x, slurUoff1.y) that refers to changing the individual 'handles' of a slur; offsetX and offsetY concern the 'overall' displacement of a slur.
In reply to I think you are looking for… by ILPEPITO
If this is not the case, your question is not very clear to me... if I move the entire slur the 'offset' and 'pos' values do not return 0...
In reply to If this is not the case,… by ILPEPITO
Oh, weird. There must be something wrong in my code... I will look into it.
In reply to Oh, weird. There must be… by michaelnorris
The explanation could be this: if you select the score with the 'blue rectangle' the slurs are identified as a 'Tie' element (number 28) and do not allow access (not even read) to the offset/pos properties (or rather they do not detect them). Access is only possible (read/write) with individual selections (the item found is 'Tie_Segment'). I'm just guessing... It's up to you to say if that's the problem.
In reply to The explanation could be… by ILPEPITO
For the sake of precision, I will add that, of course, for 'slur' and 'slur_segment' it is the same thing...