diff --git a/src/dialog/dlgkeywheel.cpp b/src/dialog/dlgkeywheel.cpp index e05e075f55d..af1126f0216 100644 --- a/src/dialog/dlgkeywheel.cpp +++ b/src/dialog/dlgkeywheel.cpp @@ -155,7 +155,12 @@ void DlgKeywheel::updateSvg() { if (text.isText()) { QDomText textNode = text.toText(); - ChromaticKey key = static_cast(id.midRef(2).toInt()); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + const int keyInt = QStringView(id).sliced(2).toInt(); +#else + const int keyInt = id.midRef(2).toInt(); +#endif + ChromaticKey key = static_cast(keyInt); QString keyString = KeyUtils::keyToString(key, m_notation); textNode.setData(keyString); }