This warning category is spelled [multiline-strings] by qmllint.
A string spans over multiple lines.
Strings spanning multiple lines are a non-standard extension of ECMAScript and deprecated in QML. Use template literals instead.
import QtQuick
Item {
property string multiLine: "first
second
third"
property string multiLine2: 'first
second
third'
}To fix this warning, use template literals or, alternatively, replace the newlines with '\n':
import QtQuick
Item {
property string multiLine: `first
second
third`
property string multiLine2: `first
second
third`
property string alternative: "first\nsecond\nthird"
property string alternative2: "first\n" +
"second\n" +
"third"
}
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.9/qmllint-warnings-and-errors-multiline-strings.html