[PyQt] Is there a way to run the interp AND a gui?

Jason H scorp1us at yahoo.com
Thu Mar 4 02:51:35 GMT 2010


Undoubtedly, that would work for showing the widget. And yes, I've done that much. Unless something has changed recently,  I eventually have to call app.exec_(), which would block until last window has closed...

I seems the previous email of calling eval() might be the right route.





----- Original Message ----
From: Phil Thompson <phil at riverbankcomputing.com>
To: Jason H <scorp1us at yahoo.com>
Cc: PyQt <pyqt at riverbankcomputing.com>
Sent: Wed, March 3, 2010 3:21:07 AM
Subject: Re: [PyQt] Is there a way to run the interp AND a gui?

On Tue, 2 Mar 2010 15:04:37 -0800 (PST), Jason H <scorp1us at yahoo.com>
wrote:
> I am working on the new Qt/Kinetic stuff and one thing I would really
like
> to have is an interactive GUI for it. Ideally, I'd have something like
the
> interactive interpreter, which when I type x=QGrahpicsTextItem(...) and
add
> it to the scene, it appears in the scene. Then I can do that with
graphics
> effects and test out animations. 
> 
> The problem though, is the event loop needs to be running for the
painting
> to happen. So I am confused if this is even possible? I'd even settle for
> some IPC that would translate commands to a seperate process running the
> GUI, if there was a way to do it (so that then I do
x=QGrahicstextItem(...)
> x is actually a handle to the actual object in another process. But this
> looks waaay complicated. 
> 
> Thoughts?

Have you actually tried it...

>>> from PyQt4.QtGui import *
>>> app = QApplication([])
>>> w = QWidget()
>>> w.show()

Phil



      



More information about the PyQt mailing list