Split qml file into 2 broken in musescore 3
It looks like separating a qml file into multiple is not working anymore.
Does anyone know why.
Here's what I tried:
// MyRectangle.qml import QtQuick 2.0 Rectangle { anchors.fill: parent color: blue }
and the main file:
import QtQuick 2.0 import MuseScore 3.0 MuseScore { menuPath: "Plugins.pluginName" description: "Description goes here" version: "1.0" MyRectangle {id: mycomponent} }
This outputs: Creating component failed line 8: MyRectangle is not a type
I also tried adding the line import "MyRectangle.qml"
at the beginning of main.qml
.
Doesn't work: same issue.
I was looking for some plugins that used splitting into multiple files, like mentionned in this thread
However, I found out that both plugins had been rewritten to fit in a single file.
I know javascript imports work fine, but has anyone managed these?
Comments
I believe it still works for the QuarterTonePlayback plugin
In reply to I believe it still works for… by Jojo-Schmitz
the quarter tone playback plugin is deprecated. It has been replaced by the accidental tuner which comes in a single file.
See also https://musescore.org/en/node/298179
In reply to See also https://musescore… by Jojo-Schmitz
Yes, it works perfectly for javascript.
However, it doesn't work for QML...
Still stuck...
In reply to Yes, it works perfectly for… by ecstrema
might be caused by https://github.com/musescore/MuseScore/commit/c17698147791e1d19a86a6243…
maybe addImportPath should be called here instead of that (maybe destructive?)
setImportPath
In reply to might be caused by https:/… by ecstrema
Could these lines:
be replaced by
Unfortunately, i cant install Qt at my school computer, so i can't build MuseScore myself.
Could anyone try that for me?
might be worth an issue, though...
In reply to Could these lines: #ifdef Q… by ecstrema
It looks like by default, the list pluginPathList contains only "."