[prev in list] [next in list] [prev in thread] [next in thread]
List: python-cpp-sig
Subject: [C++-sig] porting Qt 3.3.x to python
From: meine () kogs1 ! informatik ! uni-hamburg ! de (Hans Meine)
Date: 2005-11-29 14:35:36
Message-ID: 200511291535.37200.meine () kogs ! informatik ! uni-hamburg ! de
[Download RAW message or body]
On Tuesday 22 November 2005 18:03, Ralf W. Grosse-Kunstleve wrote:
> > Can I tell boost to use qt objects from PyQt instead of generating it's
> > own version of them?
>
> That's probably something you'd have to figure out yourself. A few months
> ago someone asked a similar question regarding SWIG. It was surprisingly
> easy to support passing SWIG-wrapped objects to Boost.Python wrapped
> functions:
>
> http://cvs.sourceforge.net/viewcvs.py/cctbx/boost_adaptbx/swig_arg.hpp?view
>=markup
>
> http://cvs.sourceforge.net/viewcvs.py/cctbx/boost_adaptbx/swig_args_ext.cpp
>?view=markup
>
> If you are lucky, maybe something similar works for SIP. You'd have to find
> out how the SIP wrapping mechanism works.
Yes, it is possible; for example I did it with code fragments like these (this
is also a hint for Jan Langer how such a thing could look like):
#include <sipvigraqtDeclvigraqt.h> // my SIP module was called vigraqt
PyObject *getViewer()
{
return sipMapCppToSelfSubClass(
somehowGetViewer(), sipClass_QImageViewer);
}
BOOST_PYTHON_MODULE_INIT(sipbridge)
{
def("viewer", &getViewer);
}
--
Ciao, / /
/--/
/ / ANS
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic