[Gui]overload toQGraphicsItem, toQGraphicsObject for PyObject
This commit is contained in:
@@ -563,6 +563,11 @@ QGraphicsItem* PythonWrapper::toQGraphicsItem(PyObject* pyPtr)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QGraphicsItem* PythonWrapper::toQGraphicsItem(const Py::Object& pyobject)
|
||||
{
|
||||
return toQGraphicsItem(pyobject.ptr());
|
||||
}
|
||||
|
||||
QGraphicsObject* PythonWrapper::toQGraphicsObject(PyObject* pyPtr)
|
||||
{
|
||||
#if defined (HAVE_SHIBOKEN) && defined(HAVE_PYSIDE)
|
||||
@@ -576,6 +581,12 @@ QGraphicsObject* PythonWrapper::toQGraphicsObject(PyObject* pyPtr)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QGraphicsObject* PythonWrapper::toQGraphicsObject(const Py::Object& pyobject)
|
||||
{
|
||||
return toQGraphicsObject(pyobject.ptr());
|
||||
}
|
||||
|
||||
|
||||
Py::Object PythonWrapper::fromQIcon(const QIcon* icon)
|
||||
{
|
||||
#if defined (HAVE_SHIBOKEN) && defined(HAVE_PYSIDE)
|
||||
|
||||
@@ -53,10 +53,11 @@ public:
|
||||
bool toCString(const Py::Object&, std::string&);
|
||||
QObject* toQObject(const Py::Object&);
|
||||
QGraphicsItem* toQGraphicsItem(PyObject* ptr);
|
||||
QGraphicsItem* toQGraphicsItem(const Py::Object& pyObject);
|
||||
QGraphicsObject* toQGraphicsObject(PyObject* pyPtr);
|
||||
QGraphicsObject* toQGraphicsObject(const Py::Object& pyObject);
|
||||
|
||||
Py::Object fromQPrinter(QPrinter*);
|
||||
|
||||
Py::Object fromQObject(QObject*, const char* className=nullptr);
|
||||
Py::Object fromQWidget(QWidget*, const char* className=nullptr);
|
||||
const char* getWrapperName(QObject*) const;
|
||||
|
||||
Reference in New Issue
Block a user