インラインコンポーネントの重複
この警告カテゴリーはqmllintによって[duplicate-inline-component]
。
インラインコンポーネントの重複
何が起こりましたか?
2つのインラインコンポーネントが同じ名前です。
なぜ悪いのですか?
一つの名前が複数の型を参照し、曖昧さを引き起こします。これはコンパイルに失敗します。
例
import QtQuick Item { component R : Rectangle { color: "red" } component R : Rectangle { color: "blue" } // Fail to compile }
この警告を修正するには、インライン・コンポーネントの1つを削除するか、名前を変更してください:
© 2025 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.