Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
duplicated-name.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2023 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\ingroup qmllint-warnings-and-errors
6
7
\title Duplicated name
8
\brief [duplicated-name] Multiple members share the same name in the same component.
9
10
\qmllintwarningcategory duplicated-name
11
12
\section1 Duplicated property, signal, or method name
13
14
\section2 What happened?
15
You gave a property, signal or method a name which is already in use in the current
16
QML component.
17
18
\section2 Why is this bad?
19
The QML runtime doesn't create components with duplicate member names at runtime: they
20
will be null instead.
21
22
\section2 Example
23
\qml
24
import QtQuick
25
26
Item {
27
property int helloWorld
28
property int helloWorld // duplicate property
29
signal helloWorld() // duplicate signal
30
}
31
\endqml
32
To fix this warning, remove or rename the duplicate members:
33
\qml
34
import QtQuick
35
36
Item {
37
property int helloWorld
38
signal helloWorldSignal()
39
}
40
\endqml
41
42
*/
qtdeclarative
src
qml
doc
src
qmllint
duplicated-name.qdoc
Generated on
for Qt by
1.16.1