<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-forward-container"><br>
<br>
-------- Original Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
</th>
<td>Re: [PyQt] c++ app integrate PyQt</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Mon, 30 Sep 2013 17:51:28 -0700</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>John Fabiani <a class="moz-txt-link-rfc2396E" href="mailto:johnf@jfcomputer.com"><johnf@jfcomputer.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td>Matt Newell <a class="moz-txt-link-rfc2396E" href="mailto:newellm@blur.com"><newellm@blur.com></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>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
</pre>
<br>
</div>
<br>
</body>
</html>