Porting to 4.4
Anyone was able to port to 4.4 and could supply an example for diolog type pulgin?
Anyone was able to port to 4.4 and could supply an example for diolog type pulgin?
Do you still have an unanswered question? Please log in first to post your question.
Comments
Check https://musescore.org/en/node/337468
In reply to Check https://musescore.org… by Jojo-Schmitz
The page doesn't mention anything about 4.4.
but I understand we wave to use the following:
import QtQuick.Controls 2.15
import Muse.UiComponents 1.0 not Musescore.UiComponents ?
In reply to The page doesn't mention… by .ash86
Some examples in the source: https://github.com/musescore/MuseScore/tree/master/share/plugins
In Linux Qt.labs.settings is not available.
In many cases, it is far more complicated than just changing some lines, see e.g. the Chord ID plugin. https://musescore.org/en/project/chord-id-and-roman-numeral-analysis : https://musescore.org/en/node/345409
In reply to The page doesn't mention… by .ash86
It is those
//4.4
commentsIn reply to It is those //4.4 comments by Jojo-Schmitz
thanks but those are useful for porting from 3.6 to 4.x. After i updated to 4.4 today all my plugins seem broken (at least the ones that have a dialog window). I'm trying to make a simple test plugin, using UiComponents, and with only one button to see where the problem could be. All i get is an empty window. Here is what im doing:
In reply to thanks but those are useful… by .ash86
ok nevermind, this seems to be working now (not sure what the problem was before).
With what can i replace MessageDialog {} as QtQuick.Dialogs are no longer supported?
In reply to With what can i replace… by .ash86
Should be available. https://doc.qt.io/qt-6.2/qtquickdialogs-index.html
(note that you are not required to specify the version anymore
import QtQuick.Dialogs is enough, but it will break backwards compatibility)
In reply to Should be available. https:/… by graffesmusic
hmm that didn't work. Importing QtQuick.Dialogs breaks the plugin in 4.4.
In reply to hmm that didn't work… by .ash86
Yep; that's what i meant with 'In many cases, it is far more complicated than just changing some lines'
In reply to hmm that didn't work… by .ash86
Is there a way to open an error dialog using muse.Ui?
In reply to Is there a way to open an… by .ash86
No idea, the muse.UI is something dark. But errors are logged in the logfile. Or if you start via command line, with -d switch
For better or worse I winged it a bit and was able to upgrade my 4.3 compatible script to 4.4:
https://github.com/birdwellmusic/PruneStack/blob/master/prunestack-4.4x…
Things to note:
* I referenced the MuseScore logs to pinpoint at least one error and that got me started.
* I chose not to use the version numbers in my script
* From examples, it looked as those most elements need an id attribute, so I added
* At least one error in the log pointed me to invalid properties in my script
Qt's QML reference was a handy reference:
https://doc.qt.io/qt-6/qmltypes.html
I need a better editor and perhaps a visual QML dialog editor to make things better. Maybe someday - for now I just edit and test in Notepad++ and it shows! ;)
In reply to For better or worse I winged… by rob@birdwellmu…
Yes, in 4.4 (or rather with Qt6) you can ommit the version numbers on those import statemenmts, but that'd cause incompatibility with earlier 4.x or 3.x versions.
Instead of
use
Also replace QtQuick.Controls'
TextField
withTextEdit
Thanks everyone for the replies.
What was throwing me off was how to substitute elements that used Qt.Dialog module, especifically popup windows for errors and/or messages. I used to do that using the MessageDialog{} object.
However, I was able to substitute this with the following without breaking compatibility with 3.x.