[C++-sig] Opening up a main window asynchronously
gazihan at cse.wustl.edu
Sat Sep 22 08:52:27 CEST 2007
Hi, thanks for the responses Hans and François.
Hans Meine wrote:
> You might want to have a look at IPython, which does 2).
Oh, IPython is one cool piece of candy, thank you for creating such a nice
tool. I'm using it for everything Python from now on. I think I may also
end up using it for this GUI thing.
> You have to be careful though since e.g. Qt only allows Qt functions to be
> called from the mainloop thread. (In version 3, that is.) And no,
> IPython is not 100% careful enough yet. :-(
Yes! I remember being frustrated trying to have a QApplication on a thread
it Qt3. I'm not sure which thread library I tried though (QThread or
pthreads). I just tried the same thing on Qt4 with QThread now and it
didn't work as the documentation says, but then I tried with pthreads and
it worked just fine. I could update the GUI with a pthread where I created
the QApplication and make the main thread stay in an infinite loop printing
out numbers. I may end up just updating the GUI with pthreads and doing the
simulation stepping via Python. It's nice to have options and I'll try to
find the most convenient configuration.
Thanks for the help guys I appreciate it.
More information about the Cplusplus-sig