Recommended QT version(s) for Musescore 2/3 plugins

• Jan 11, 2019 - 17:07

Hello,
I am taking an Udemy course on QT quick and QML so I can learn how to write plugins for Musescore 2 and 3. What version of QT should I install (e.g., 5.11 or 5.12) from http://download.qt.io/official_releases/qt/

Thanks,
Sam


Comments

The QT Quick imported in the notenames.qml for Musescore 3 is 2.0? But the current version is already up to 2.5? Why does Musescore 3 use such an outdated QT Quick version, or was the plugin not completely updated to the current QT used by Musescore 3?

In reply to by mike320

Basically, the one supplied by the distribution.

Currently, the lowest common denominator is Qt 5.8 (for MuseScore 3) and Qt 5.4 (for MuseScore 2) and whatever QtQuick came with that. I’d suggest sticking to that baseline because otherwise, some of your plugins won’t work for some users.

In reply to by Jojo-Schmitz

Thanks everyone for weighing in.

Do you think by the time the plugin capacity has been re-enabled in Musescore 3 (in a month or so), that the Windows version of Musescore will be updated to QT 5.12 LTS? Interestingly, Linux and Mac versions already are (https://musescore.org/en/handbook/developers-handbook/references/versio…). Since I suspect that Musescore 3 plugins will not be backwards compatible anyway, I would like to use the newest version of QT Quick as possible.

In reply to by Sambaji

For macOS 10.10 & 10.11 it would be Qt 5.9, if and when 5.9.8 comes out.
For Windows we will go to 5.12 as soon as AppVeyor supports it, I believe the unsupported 32bit version is already.
Assuming Qt 5.9 should be a save bet.
Can you think of any advantages 5.12 brings for plugins?

In reply to by Jojo-Schmitz

Since I am a novice, newer just seems cooler--perhaps enhanced JavaScript features?
Since 5.9, handling of JS calls has been optimized for qml, bringing large improvements especially when calling small functions, and the qml JavaScript engine now supports ECMAScript 7. I suspect these improvements have only a minor impact in developing Musescore plugins. I believe that QT 5.9 already supports ECMAScript 6, and 7 was only a minor upgrade.

I'll learn on QT 5.12 and switch to 5.9 when I develop plugins for Musescore 3, which could be awhile. Thanks for the input.

In reply to by Sambaji

No, this is wrong. On GNU/Linux, MuseScore uses whatever the surrounding distribution offers (except containerised formats like AppImage which ship Qt embedded in the container, including all of its security holes).

That is 5.8 (not 5.9 as Jojo-Schmitz said), which is the declared minimum in the CMakeLists.txt file.

I’m the Debian packager (and taking care of *buntu as well), we have there:

  • Debian 9 (stretch): Qt 5.7, MuseScore 2 (via backports), but also a backport of MuseScore 3 without plugin support due to the too-old Qt (via backports-sloppy)
  • Debian 10 (buster): Qt 5.11, MuseScore 2 (ships with) and 3 (via backports)
  • Ubuntu 12.04 (precise), 14.04 (trusty), 16.04 (xenial): Qt 5.5, MuseScore 2 only (via PPA)
  • Ubuntu 18.04 (bionic): Qt 5.9, MuseScore 2 (via PPA) and 3 (via PPA)
  • Ubuntu 19.04 (disco): Qt 5.11, MuseScore 2 (ships with) and 3 (via PPA but only until 19.10)

So, for Debian and most common derivatives, Qt 5.9 is likely to stay the minimum you want to support for the next five to seven years or so. Other distributions may have other requirements. The Qt version is not generally changed over the lifetime of a distribution (we made an incredibly fragile hack by backporting xenial’s Qt to trusty and precise), and from what I see, multimedia distribution users are not likely to upgrade to the latest release (Debian) or LTS (*buntu) quickly (I know I’ll probably get quite some flak for not providing MuseScore 3 to xenial, but that just won’t work, and backporting Qt has too many implications).

A short survey of multimedia derivatives: AV Linux 2018.6 has Qt 5.7 (so no plugins), Apodio 11 has Qt 5.5 (so no MuseScore 3), I can’t figure out what io and iro have, and KXStudio is “currently based on Ubuntu 14.04.5 LTS”.

In reply to by mirabilos

Good to know about the various Linux-GNU versions. It's great Mirabilos and others are putting the work into making Musescore available on older Linux-GNU systems. With so many Linux-GNU distros moving to 64bit only, many 32bit computers will have to remain on older OSs, which I will suspect will be increasingly harder to support for future Musescore upgrades. Sticking with an older QT LTS (e.g., 5.9) for the coming years makes sense.

I am working on my first plug-in with Musescore 3. At first I was just coping from other plug-ins all of which uses QtQuick 1. I have then tried bigger and bigger import numbers till it failed. Here is what I settled on.
import MuseScore 3.0
import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 1.3
import QtQuick.Dialogs 1.2

Do you still have an unanswered question? Please log in first to post your question.