pysideqmluncreatable.h 798 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 PYSIDEQMLUNCREATABLE_H
  4. #define PYSIDEQMLUNCREATABLE_H
  5. #include <sbkpython.h>
  6. #include <QtCore/qbytearray.h>
  7. QT_FORWARD_DECLARE_CLASS(QMetaObjectBuilder)
  8. // The QmlUncreatable decorator modifies QmlElement to register an uncreatable
  9. // type. Due to the (reverse) execution order of decorators, it needs to follow
  10. // QmlElement.
  11. extern "C"
  12. {
  13. extern PyTypeObject *PySideQmlUncreatable_TypeF(void);
  14. }
  15. void initQmlUncreatable(PyObject *module);
  16. void setUncreatableClassInfo(PyTypeObject *type, const QByteArray &reason);
  17. void setUncreatableClassInfo(QMetaObjectBuilder *builder, const QByteArray &reason);
  18. #endif // PYSIDEQMLUNCREATABLE_H