<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/30/2013 06:11 PM, John Fabiani
wrote:<br>
</div>
<blockquote cite="mid:524A214B.1000100@jfcomputer.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<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 moz-do-not-send="true"
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 moz-do-not-send="true"
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>
</div>
</blockquote>
Write the right phrase in a google search and you find things. But
I wonder if this the best solution? It's also old.<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="http://acaciaecho.wordpress.com/2011/08/15/hybridqtwithpyqt/">http://acaciaecho.wordpress.com/2011/08/15/hybridqtwithpyqt/</a><br>
<br>
Anyone, have opinion?<br>
<br>
Johnf<br>
<br>
<br>
</body>
</html>