On Tuesday, November 23, 2010 04:38:04 am Elias Bachaalany wrote:
> On 11/23/2010 12:20 PM, Matti Airas wrote:
> > On 23.11.2010 11:14, ext Elias Bachaalany wrote:
> >> On 11/19/2010 5:13 PM, John Fabiani wrote:
> >>> Hi,
> >>> Here's my story. I am a python programmer and I'm trying to leverage my
> >>> experience with python. All of my GUI experience has been with
> >>> wxPython. Therefore, I know little to nothing about QT. And not a lot
> >>> about C++.
> >>> 
> >>> I want to be able to create my forms/dialogs/frames (or whatever you
> >>> folks
> >>> call them) using PySide and somehow integrate into an existing program
> >>> written
> >>> in C++ QT (the program in question is a xTuple and source is
> >>> available).
> >>> 
> >>> It's my understanding that it is possible. So my questions are:
> >>> 
> >>> 1. Is it a good idea?
> >> 
> >> Why not. We have demonstrated how our users can do that (through a
> >> plugin) in our product (written in C/C++):
> >> 
> >> http://www.hexblog.com/?p=229
> > 
> > Elias, this is really cool! I wasn't aware of this.
> > 
> > I added a link to the blog post to the PySide wiki at Qt Developer
> > Network.
> > 
> > Cheers,
> > 
> > ma.
> 
> Hello Matti,
> 
> Indeed it is cool, thanks for linking the blog entry.
> 
> We had to compile PySide a bit differently though (The thread "Compiling
> PySide with a custom namespace" in here shows the patch).
> 
> Given:
> - A C++ program hosting both Python and Qt
> - The C++ host (IDA) uses Qt compiled with VS and QT_NAMESPACE=QT
> - IDA alos hosts Python through the C++ plugin called IDAPython
> 
> To get PySide to work:
> - Compile it with QT_NAMESPACE=QT and VS (requires the aforementioned
> patch in order to change QT_NAMESPACE, unless you integrated it already)
> - I had to add a method to pass widgets from C++ to PySide (also in the
> patch)
> 
> Since the C++ host already has the QApplication and the message loop,
> PySide should work nicely. Just have the host execute a Python script
> that works with PySide.
> 
> Hope that is of help,
> Elias

Thanks to everyone - I had sort of given up on the idea of using pyside from 
within a C++ QT application.  I'm really glad I decided to check back.

Johnf
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to