Renamed Type
This warning category is spelled [renamed-type] by qmllint.
Renamed Type
What happened?
A type, which was renamed via QT_QML_SOURCE_TYPENAME or via a hand-written qmldir, was called by its unexported name.
Why is this bad?
This leads to confusing code, as a single type now has more than one name. Renamed singletons won't work correctly when using their unexported name, and the unexported name can't be used by QML files outside the current QML module.
Example
# CMakeLists.txt
set_source_files_properties(Tree.qml PROPERTIES QT_QML_SOURCE_TYPENAME BinaryTree)
qt_add_qml_module(MyModule
URI MyModule
QML_FILES Tree.qml
)// Tree.qml
import QtQml
Item {
property Tree left // uses old name - not ok
property Tree right // uses old name - not ok
}To fix this warning, replace the old name with the new name:
// Tree.qml
import QtQml
Item {
property BinaryTree left // uses new name - ok
property BinaryTree right // uses new name - ok
}© 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.