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
attached-property-type.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2024 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qmllint-warnings-and-errors-quick-attached-property-type.html
6
\ingroup qmllint-warnings-and-errors
7
8
\title Quick: Attached property type
9
\brief [Quick.attached-property-type] Misuses of the Quick attached property types.
10
11
\qmllintwarningcategory Quick.attached-property-type
12
13
\section1 Attached property must be attached to an object deriving from a particular type
14
15
\section2 What happened?
16
You instantiated an attached property in an object of the wrong type.
17
18
\section2 Why is this bad?
19
The attached property will not work.
20
21
\section2 Example
22
\qml
23
import QtQuick
24
25
Item {
26
QtObject {
27
LayoutMirroring.enabled: true
28
}
29
}
30
31
\endqml
32
To fix this warning, change the enclosing type to inherit from the type
33
mentioned in the warning message:
34
35
\qml
36
import QtQuick
37
38
Item {
39
Item {
40
LayoutMirroring.enabled: true
41
}
42
}
43
44
\endqml
45
*/
qtdeclarative
src
qml
doc
src
qmllint
quick
attached-property-type.qdoc
Generated on
for Qt by
1.14.0