Nesta página

Nome duplicado

Essa categoria de aviso é denominada “ [duplicated-name] ” pelo qmllint.

Nome duplicado de propriedade, sinal ou método

O que aconteceu?

Você atribuiu a uma propriedade, sinal ou método um nome que já está em uso no componente QML atual.

Por que isso é ruim?

The QML Runtime does not create components with duplicate member names during execution: instead, they will be null.

Exemplo

import QtQuick

Item {
    property int helloWorld
    property int helloWorld // duplicate property
    signal helloWorld() // duplicate signal
}

Para corrigir esse aviso, remova ou renomeie os membros duplicados:

import QtQuick

Item {
    property int helloWorld
    signal helloWorldSignal()
}

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