In plugin run.qml, QProcess "not a type" or "not installed".
Reported version
3.0
Type
Plugins
Frequency
Few
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
Basically when you want to run the "run.qml" plugin or if you want to run an external command with any plugin, the Debug console outputs : "QProcess is not a type".
I have tried to add "import QProcess 1.0", "import QProcess 2.0" or "import QProcess 3.0" at the beginning of the file but then it outputs : "module "QProcess" is not installed".
So is there a way I could run an external program ?
Fix version
3.2.0
Comments
I believe the run.qml plugin is not yet working in MuseScore 3 at all. It may once https://github.com/musescore/MuseScore/pull/5021 got merged, not sure. But even then it most probably still only works for Linux.
Surely not critical, being a sample plugin with very restricted usefullness
Check http://www.xargs.com/qml/process.html, seems MuseScore would need to expose this to its plugin framework. The corresponging code in MuseScoe is currently commented out, see mscore/plugin/api/qmlpluginapi.cpp, line 307
Added to https://github.com/musescore/MuseScore/pull/5021, seems very simple (and even works in Windows, like executing "cmd.exe /c dir"
I wonder whether it is similarly simple to add ScoreView to the plugin APIs, to enable the view.qml...
And indeed it is! Added it to the PR
Thanks for the quick answer, I'll check this out today.
I was thinking it may be important since when you developa plugin of any kind of complexity you'd want to add external commands. In my case, it is about running a python script. I forgot to mention it but i got the bug on linux.
It does feel similar to when I tried to read a file with FileIO
Fixed in branch master, commit dea0a38823
fix #289553: expose QProcess to plugin API
Automatically closed -- issue fixed for 2 weeks with no activity.