[Gui]add support for QGraphicsObject to PythonWrapper

This commit is contained in:
Wanderer Fan
2022-05-07 15:24:12 -04:00
committed by WandererFan
parent 30b0efe025
commit ad64c57acd
2 changed files with 31 additions and 3 deletions

View File

@@ -24,13 +24,17 @@
#ifndef GUI_PYTHONWRAPPER_H
#define GUI_PYTHONWRAPPER_H
#include <QGraphicsItem>
#include "qglobal.h"
#include <Base/PyObjectBase.h>
#include <FCGlobal.h>
QT_BEGIN_NAMESPACE
class QDir;
class QIcon;
class QGraphicsObject;
class QGraphicsItem;
class QObject;
class QWidget;
QT_END_NAMESPACE
namespace Gui {
@@ -47,6 +51,8 @@ public:
bool toCString(const Py::Object&, std::string&);
QObject* toQObject(const Py::Object&);
QGraphicsItem* toQGraphicsItem(PyObject* ptr);
QGraphicsObject* toQGraphicsObject(PyObject* pyPtr);
Py::Object fromQObject(QObject*, const char* className=nullptr);
Py::Object fromQWidget(QWidget*, const char* className=nullptr);
const char* getWrapperName(QObject*) const;