| 32 | using namespace Gui; |
| 33 | |
| 34 | ExpressionBindingPy::ExpressionBindingPy(Py::PythonClassInstance* self, Py::Tuple& args, Py::Dict& kwds) |
| 35 | : Py::PythonClass<ExpressionBindingPy>::PythonClass(self, args, kwds) |
| 36 | { |
| 37 | PyObject* pyObj; |
| 38 | if (!PyArg_ParseTuple(args.ptr(), "O", &pyObj)) { |
| 39 | throw Py::Exception(); |
| 40 | } |
| 41 | |
| 42 | PythonWrapper wrap; |
| 43 | wrap.loadWidgetsModule(); |
| 44 | |
| 45 | QWidget* obj = qobject_cast<QWidget*>(wrap.toQObject(Py::Object(pyObj))); |
| 46 | expr = asBinding(obj); |
| 47 | |
| 48 | if (!expr) { |
| 49 | throw Py::Exception(PyExc_TypeError, "Wrong type"); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | ExpressionBindingPy::~ExpressionBindingPy() = default; |
| 54 |
nothing calls this directly
no test coverage detected