blob: 88ad5d88dd355d6b1c3fc83ba55f76f92ed22b26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "attached.h"
Attached::Attached(QObject *parent) :
QObject(parent)
{
}
int Attached::a() const
{
return mA;
}
void Attached::setA(int a)
{
// Intentionally omit the early return in order to force a binding loop.
mA = a;
emit aChanged();
}
Attached *Attached::qmlAttachedProperties(QObject *object)
{
return new Attached(object);
}
|