-------- Original Message --------
Subject: Re: [PyQt] c++ app integrate PyQt
Date: Mon, 30 Sep 2013 17:51:28 -0700
From: John Fabiani <jo...@jfcomputer.com>
To: Matt Newell <newe...@blur.com>
On 09/30/2013 05:24 PM, Matt Newell wrote:
On Monday, September 30, 2013 04:51:24 PM John Fabiani wrote:
Hi,
I have an existing Qt C++ app (Qt5.1.1). Is it possible to integrate
PyQt into the project. I'd like the PyQt to have access to some of the
C++ functions, C++ classes, but I want to write frames,windows, all the
controls in PyQt including accessing the database. Most important I
want only one app loop. I was able in get PythonQt working but realized
that it was a lot of work to get it to do what I want - that is to
create a complete sub-program written in python.
Any hints or links will be helpful.
Thankis in advance,
Johnf
Yes it's possible. You have to wrap any c++ classes you want to use from
python using sip. Then you need to embed python in your app, or rewrite the
main part of the application in python.
You'll want to first split your app into a library so you can test your python
bindings from a regular python script or cmd interpreter. Start with one
class to get your feet wet and go from there.
Matt
That sounds encouraging. But it lacks a little detail - like how does
one embed python (PyQt) into a C++ app. The sip I sort of understand
and it is doable. I only need a few C++ classes and that makes sense.
But I don't have a clue how or where to start on embeding PyQt. Does
someone have an example or a link explaining the details.
Johnf
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt