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

Andreas Pakulat apaku at gmx.de
Wed Mar 3 07:18:24 GMT 2010


On 02.03.10 15:04:37, Jason H 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. 

Well, you could simply create a textwidget along with the real GUI app
where you can type python commands and execute them via some shortcut by
passing the textedit content to eval(). Once you're done with
development of the app you can simply remove the couple of lines that
create the textwidget...

Andreas

-- 
Are you sure the back door is locked?


More information about the PyQt mailing list