Embeding: C++ Objects visible from Python

David Abrahams abrahams at mediaone.net
Fri Sep 29 07:42:15 EDT 2000


<heath7952 at my-deja.com> wrote in message news:8r00ar$ddj$1 at nnrp1.deja.com...
> Dear All,
>
> I have developed a C++ application using Trolltech's Qt GUI API. I have
> embedded Python within this application using SIP. I would like to
> create a MainWindow widget plus various other widgets on the C++ side
> and then pass their  handles over to the Python side. On the Python side
> create additional child widgets and manipulate the existing C++ side
> widgets using PyQt bindings.
>
> Currently I can launch my app, execute PyQt scripts in my embedded
> command window and all works fine, dialog boxes popup etc... But I have
> been unable to bridge this connectivity gap between the two sides.
>
> I have scoured the web and read sections in several books but I am
> unable to figure it out. Does anyone have any examples explaining
> a solution to this problem, or any relevant experience.

[Advertisement]
I have no experience with SIP, but I can offer you an alternative system
which is designed to do exactly what you are describing. The documented
examples show how to expose a C++ class in Python so that it can be
subclassed.

See http://people.ne.mediaone.net/abrahams/downloads/py_cpp.html

Regards,
Dave






More information about the Python-list mailing list