QML Spinner doesn't work with MuseScore custom UI style

• May 1, 2014 - 22:21
Type
Plugins
Severity
S4 - Minor
Status
active
Project

See http://musescore.org/en/node/25603

when loading the plugin in 2.0, it looks like this and doesn't change on click:
BreakX.png

It breaks the page as expected though (by default 4 bars, hardcoded), and one can in/decrease the amount of bars with shift + up/down as well as typing blindly some number into the dialog. There is no visible indication.

There is another, possibly related issue though (in 2.0):

1.: Select a part of your score
2.: Open the "Break every X number of measures" plugin and press enter
3.: Select the same part again and reopen the plugin
4.: Now de/increase X and press enter

For the OP, this results in the generic key signatures(bflat, eflat, aflat in that case) being shown every 4 bars, where a linebreak used to be.

OP is using MuseScore guthub-MuseScore-musecore-3543170 on Ubuntu 14.04.

I can reproduce this on Windows 7

That input field is supposed to be a SpinBox, but doesn't look like one, it is lacking the up-/down arrows to in-/decrease the value.

Attachment Size
BreakX.png 9.89 KB

Comments

A very cheap but rather inelegant way to work-around this problem could be to redefine the style for the spinbox inside the break plugin. Such as adding to break.qml:
{syntaxhighlighter brush:c++}import QtQuick.Controls.Styles 1.2{/syntaxhighlighter}
and inside the SpinBox definition:
{syntaxhighlighter brush:c++} style: SpinBoxStyle{
background: Rectangle {
implicitWidth: 100
implicitHeight: 20
border.color: "gray"
radius: 2
}
}{/syntaxhighlighter}
(this style was directly taken from the Qt example page; it's just an example). In this way the style for this spinbox is overwritten and it works again.
Of course, this workaround does not solve a possible underlying bug in the style which may be the cause of this plugin bug.

FWIW, there is a number of known bug in the Oxygen theme related to Qt Quick...
See https://community.kde.org/Plasma/OxygenQmlControls A good summary in the end "In Oxygen most style methods take an optional parameter which is the widget to get hints for. From QtQuickControls this is a null pointer. Oxygen sometimes fails on this and returns different to the desktop implementation."

Status (old) active patch (code needs review)

I believe that has already been fixed, but if not is certainly remedied by PR #1246, although still not perfect.

I agree it's still not great Jojo, but it will never look like lasconic's picture above for you, atl least not until you run MS on a Mac.

Sure, I know that, but it should look like the spinners in e.g. Inspector or any of the other dialogs inside MuseScore, i.e. with a clear distinction between the up- and down pointer