[PyQt] QCoreApplication::exec: The event loop is already running

2009-03-02 Thread Brent Villalobos
I have a pyqt application that imports and runs another pyqt application. I am not launching the second application in its own process, but I'm just relying on python's module importing architecture. Both applications seems to run fine without any problems, but I'm seeing this warning

Re: [PyQt] QCoreApplication::exec: The event loop is already running

2009-03-02 Thread Brian Kelley
When you start another mainwindow (or top level widget for that matter) you don't need to call exec_ or make another QApplication. The way I normally import things like this is the following: Foo.py class MainWindow()... ... def Start(): m = MainWindow() m.show() if __name__ ==

Re: [PyQt] QCoreApplication::exec: The event loop is already running

2009-03-02 Thread Brent Villalobos
Brian Kelley wrote: When you start another mainwindow (or top level widget for that matter) you don’t need to call exec_ or make another QApplication. That's good. Along those same lines does Qt provide a way of querying whether a QApplication loop is already running so you can avoid making a

Re: [PyQt] QCoreApplication::exec: The event loop is already running

2009-03-02 Thread Brian Kelley
I am unaware of one. It seems safer to re-organize your code a bit. I tend to have a lot of functional objects, widgets/mainwindows seperated into modules and then I compose them into applications under a single Qapplication, but you may have reasons for doing otherwise. Brian On 3/2/09

Re: [PyQt] QCoreApplication::exec: The event loop is already running

2009-03-02 Thread David Boddie
On Mon Mar 2 19:12:00 GMT 2009, Brent Villalobos wrote: Brian Kelley wrote: When you start another mainwindow (or top level widget for that matter) you don’t need to call exec_ or make another QApplication. That's good. Along those same lines does Qt provide a way of querying whether a

Re: [PyQt] QCoreApplication::exec: The event loop is already running

2009-03-02 Thread Giovanni Bajo
On lun, 2009-03-02 at 11:12 -0800, Brent Villalobos wrote: Brian Kelley wrote: When you start another mainwindow (or top level widget for that matter) you don’t need to call exec_ or make another QApplication. That's good. Along those same lines does Qt provide a way of querying whether