aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/plugins/designer/designercustomwidgets.h
blob: f88548044a3b79a4dfa30ff55097f9036a4fb447 (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
// Copyright (C) 2021 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 _PY_DESIGNER_CUSTOM_WIDGETS_H_
#define _PY_DESIGNER_CUSTOM_WIDGETS_H_

#include <QtUiPlugin/QDesignerCustomWidgetCollectionInterface>

// A Qt Designer plugin proxying the QDesignerCustomWidgetCollectionInterface
// instance set as as a dynamic property on QCoreApplication by the PySide6
// Qt Designer module.
class PyDesignerCustomWidgets: public QObject,
                               public QDesignerCustomWidgetCollectionInterface
{
    Q_OBJECT
    Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.PySide.PyDesignerCustomWidgetsInterface")

public:
    explicit PyDesignerCustomWidgets(QObject *parent = nullptr);
    ~PyDesignerCustomWidgets();

    QList<QDesignerCustomWidgetInterface *> customWidgets() const override;
};

#endif // _PY_DESIGNER_CUSTOM_WIDGETS_H_