aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpysideqml/pysideqmlattached.h
blob: 9365b68d3db478bfeeff93432ac61889d537d7eb (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
28
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef PYSIDEQMLATTACHED_H
#define PYSIDEQMLATTACHED_H

#include <sbkpython.h>

#include "pysideqmlmacros.h"

#include <QtCore/QtGlobal>

QT_FORWARD_DECLARE_CLASS(QObject)

namespace PySide::Qml
{

/// PySide implementation of qmlAttachedPropertiesObject<T> function.
/// \param typeObject attaching type
/// \param obj        attachee
/// \param create     Whether to create the Attachment object
/// \return           Attachment object instance
PYSIDEQML_API QObject *qmlAttachedPropertiesObject(PyObject *typeObject, QObject *obj,
                                                   bool create = true);

} // namespace PySide::Qml

#endif // PYSIDEQMLATTACHED_H