qpytextobject.h 763 B

1234567891011121314151617181920212223242526
  1. // Copyright (C) 2021 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. #ifndef QPYTEXTOBJECT
  4. #define QPYTEXTOBJECT
  5. #include <QtCore/QObject>
  6. #include <QtGui/QTextObjectInterface>
  7. // Qt5: no idea why this definition is not found automatically! It should come
  8. // from <QTextObjectInterface> which resolves to qabstracttextdocumentlayout.h
  9. #ifdef Q_MOC_RUN
  10. Q_DECLARE_INTERFACE(QTextObjectInterface, "org.qt-project.Qt.QTextObjectInterface")
  11. #endif
  12. QT_BEGIN_NAMESPACE
  13. class QPyTextObject : public QObject, public QTextObjectInterface
  14. {
  15. Q_OBJECT
  16. Q_INTERFACES(QTextObjectInterface)
  17. public:
  18. QPyTextObject(QObject *parent = nullptr) : QObject(parent) {}
  19. };
  20. QT_END_NAMESPACE
  21. #endif