[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Using SWIG to wrap application written in QT
From:       Kenneth Miller <kennethadammiller () yahoo ! com>
Date:       2013-08-28 23:29:25
Message-ID: 1377732565.77959.YahooMailNeo () web140006 ! mail ! bf1 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I was thinking this, but needed confirmation. Thanks.


________________________________
 From: Matt Newell <newellm@blur.com>
To: pyqt@riverbankcomputing.com; Kenneth Miller <kennethadammiller@yahoo.com> 
Sent: Wednesday, August 28, 2013 4:54 PM
Subject: Re: [PyQt] Using SWIG to wrap application written in QT
 

On Wednesday, August 28, 2013 01:01:43 PM Kenneth Miller wrote:
> ping. :)
> 
> 
> ________________________________
>  From: Kenneth Miller <kennethadammiller@yahoo.com>
> To: "pyqt@riverbankcomputing.com" <pyqt@riverbankcomputing.com>
> Sent: Monday, August 26, 2013 5:25 PM
> Subject: Using SWIG to wrap application written in QT
> 
> 
> 
> So I have this application that I'm writing that uses the Qt libraries. I
> want to wrap the my application and all of it's objects so that I can call
> it from a scripting language quickly, be it python, or ocaml or whatever.
> Anyway, for the last bit I've been trying to get a module compiled that
> will allow me to dynamically call into the classes & functions that I've
> defined. SWIG seems to work right, and recently I even got my own self
> defined class within a module from my C++ source to run, although it
> segfaulted and I have yet to find out exactly why. 
> 
> 
> 
> Can this be done? I mean, I was wondering it would be more appropriate that
> I use SIP. One of the problems that I'm facing (I think) is that some
> arguments to my classes and functions are Qt objects. But I can't export
> those functions in my SWIG module without also writing a wrapper to the Qt
> objects manually (is that right?). I'm very new to SWIG, but I definitely
> need the speed of a scripting language for my development, because the
> compile cycle with Qt and C++ is slow. In addition, I'm kind of
> considering SIP in parallel, so I need advice as to which is more
> appropriate. 
> 
> Can anybody advise me what the best route is in order to get what I want?
> SIP or SWIG?


You'll definitely want to use sip.  PyQt sources(check the sip dir) themselves 
are a good reference on how to do things.

Matt
[Attachment #5 (text/html)]

<html><body><div style="color:#000; background-color:#fff; font-family:times new \
roman, new york, times, serif;font-size:12pt"><div>I was thinking this, but needed \
confirmation. Thanks.</div><div><br></div>  <div style="font-family: 'times new \
roman', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times \
new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr \
size="1">  <font size="2" face="Arial"> <b><span \
style="font-weight:bold;">From:</span></b> Matt Newell &lt;newellm@blur.com&gt;<br> \
<b><span style="font-weight: bold;">To:</span></b> pyqt@riverbankcomputing.com; \
Kenneth Miller &lt;kennethadammiller@yahoo.com&gt; <br> <b><span style="font-weight: \
bold;">Sent:</span></b> Wednesday, August 28, 2013 4:54 PM<br> <b><span \
style="font-weight: bold;">Subject:</span></b> Re: [PyQt] Using SWIG to wrap \
application written in QT<br> </font> </div> <div class="y_msg_container"><br>On \
Wednesday, August 28, 2013  01:01:43 PM Kenneth Miller wrote:<br>&gt; ping. \
:)<br>&gt; <br>&gt; <br>&gt; ________________________________<br>&gt;&nbsp; From: \
Kenneth Miller &lt;<a ymailto="mailto:kennethadammiller@yahoo.com" \
href="mailto:kennethadammiller@yahoo.com">kennethadammiller@yahoo.com</a>&gt;<br>&gt; \
To: "<a ymailto="mailto:pyqt@riverbankcomputing.com" \
href="mailto:pyqt@riverbankcomputing.com">pyqt@riverbankcomputing.com</a>" &lt;<a \
ymailto="mailto:pyqt@riverbankcomputing.com" \
href="mailto:pyqt@riverbankcomputing.com">pyqt@riverbankcomputing.com</a>&gt;<br>&gt; \
Sent: Monday, August 26, 2013 5:25 PM<br>&gt; Subject: Using SWIG to wrap application \
written in QT<br>&gt; <br>&gt; <br>&gt; <br>&gt; So I have this application that I'm \
writing that uses the Qt libraries. I<br>&gt; want to wrap the my application and all \
of it's objects so that I can call<br>&gt; it from a scripting language quickly, be \
it python, or ocaml or whatever.<br>&gt; Anyway, for the last bit I've been  trying \
to get a module compiled that<br>&gt; will allow me to dynamically call into the \
classes &amp; functions that I've<br>&gt; defined. SWIG seems to work right, and \
recently I even got my own self<br>&gt; defined class within a module from my C++ \
source to run, although it<br>&gt; segfaulted and I have yet to find out exactly why. \
<br>&gt; <br>&gt; <br>&gt; <br>&gt; Can this be done? I mean, I was wondering it \
would be more appropriate that<br>&gt; I use SIP. One of the problems that I'm facing \
(I think) is that some<br>&gt; arguments to my classes and functions are Qt objects. \
But I can't export<br>&gt; those functions in my SWIG module without also writing a \
wrapper to the Qt<br>&gt; objects manually (is that right?). I'm very new to SWIG, \
but I definitely<br>&gt; need the speed of a scripting language for my development, \
because the<br>&gt; compile cycle with Qt and C++ is slow. In addition, I'm kind \
of<br>&gt; considering SIP in parallel, so I  need advice as to which is more<br>&gt; \
appropriate. <br>&gt; <br>&gt; Can anybody advise me what the best route is in order \
to get what I want?<br>&gt; SIP or SWIG?<br><br><br>You'll definitely want to use \
sip.&nbsp; PyQt sources(check the sip dir) themselves <br>are a good reference on how \
to do things.<br><br>Matt<br><br><br></div> </div> </div>  </div></body></html>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic