Importaciones duplicadas
qmllint denomina esta categoría de advertencia « [duplicate-import] ».
Importación duplicada
¿Qué ha ocurrido?
El documento contiene declaraciones de importación duplicadas.
¿Por qué es un problema?
Contaminan el documento innecesariamente y pueden ralentizar el inicio de la aplicación.
Ejemplo
import QtQuick.Controls
import QtQuick
import QtQuick 2.1 as QQ21
import QtQuick.Controls
Item {
}Para solucionar esta advertencia, elimina todas las importaciones duplicadas excepto la última. Ten cuidado de no cambiar el orden de las importaciones, ya que puede afectar a la resolución de tipos:
import QtQuick
import QtQuick 2.1 as QQ21 // different from the previous import
import QtQuick.Controls
Item {
}© 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.