On this page

Shadow

This warning category is spelled [shadow] by qmllint.

Signal or method already exists in base type

What happened?

A member in the current component has the same name as a signal or method from a base class.

Note that properties shadowing other properties are handled by the Property override category.

Why is that bad?

The shadowed signal or method can't be used anymore. It makes the code more difficult to read and may cause confusion.

Example

import QtQuick

Item {
    component Base: Item { signal f(); }
    Base {
        property int f: 42
    }
}

To fix this warning, rename the signal f or the shadowing int property.

import QtQuick

Item {
    component Base: Item { signal f(); }
    Base {
        property int notF: 42
    }
}

© 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.