複数行の文字列
この警告カテゴリは、qmllint によって「[multiline-strings] 」と表記されます。
文字列にエスケープされていない改行文字が含まれており、これは非推奨です
何が起きたのか?
文字列が複数行にまたがっています。
なぜ問題なのでしょうか?
複数行にまたがる文字列は、ECMAScript の非標準的な拡張機能であり、QML では非推奨となっています。代わりにテンプレートリテラルを使用してください。
例
import QtQuick
Item {
property string multiLine: "first
second
third"
property string multiLine2: 'first
second
third'
}この警告を解消するには、テンプレートリテラルを使用するか、あるいは改行を「\n 」に置き換えてください:
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.