Sur cette page

Nom en double

Cette catégorie d'avertissement est orthographiée « [duplicated-name] » par qmllint.

Nom de propriété, de signal ou de méthode en double

Que s’est-il passé ?

Vous avez attribué à une propriété, un signal ou une méthode un nom déjà utilisé dans le composant QML actuel.

Pourquoi est-ce un problème ?

La QML Runtime ne crée pas de composants dont les noms de membres sont en double lors de l'exécution : ceux-ci seront remplacés par la valeur null.

Exemple

import QtQuick

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

Pour corriger cet avertissement, supprimez ou renommez les membres en double :

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.