Duplicate Imports
This warning category is spelled [duplicate-import]
by qmllint.
Duplicate import
What happened?
The document contains duplicate import statements.
Why is that bad?
They pollute the document unnecessarily and may slow down startup of the app.
Example
import QtQuick.Controls
import QtQuick
import QtQuick 2.1 as QQ21
import QtQuick.Controls
Item {
}
To fix this warning, remove all but the last duplicated import. Be careful to not change the order of imports, as it can affect type resolution:
import QtQuick import QtQuick 2.1 as QQ21 // different from the previous import import QtQuick.Controls Item { }
© 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.