aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/qpytextobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/PySide6/qpytextobject.h')
-rw-r--r--sources/pyside6/PySide6/qpytextobject.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/qpytextobject.h b/sources/pyside6/PySide6/qpytextobject.h
new file mode 100644
index 000000000..45bb0bd52
--- /dev/null
+++ b/sources/pyside6/PySide6/qpytextobject.h
@@ -0,0 +1,28 @@
+// 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 QPYTEXTOBJECT
+#define QPYTEXTOBJECT
+
+#include <QtCore/QObject>
+#include <QtGui/QTextObjectInterface>
+
+// Qt5: no idea why this definition is not found automatically! It should come
+// from <QTextObjectInterface> which resolves to qabstracttextdocumentlayout.h
+#ifdef Q_MOC_RUN
+Q_DECLARE_INTERFACE(QTextObjectInterface, "org.qt-project.Qt.QTextObjectInterface")
+#endif
+
+QT_BEGIN_NAMESPACE
+class QPyTextObject : public QObject, public QTextObjectInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QTextObjectInterface)
+public:
+ QPyTextObject(QObject *parent = nullptr) : QObject(parent) {}
+};
+QT_END_NAMESPACE
+
+#endif
+
+