[Qt-interest] QApplication on separate thread...
Arnold Krille
arnold at arnoldarts.de
Tue Jun 22 22:36:57 CEST 2010
On Tuesday 22 June 2010 20:55:10 Andre Somers wrote:
> Op 22-6-2010 19:35, Eric Clark schreef:
> > I have a non-Qt application that loads a Qt application. The non-qt
> > application would like to instantiate and start the Qt application on
> > a separate thread than the main thread in which it resides. I am
> > getting some errors associated with sending signals to objects on
> > different threads. I was wondering if anyone could tell me if it is
> > possible to have a QApplication that resides on a thread different
> > than that of the main application? Or is it a requirement that the
> > QApplication reside on the application's main thread?
> The main application needs to be in the main thread, as do all paint
> operations.
Nope. All painting operations have to happen in the thread that instantiates
the X-connections. Which is the thread that instantiates QApplication. That
doesn't necessarily have to be the apps main-process.
> But... I don't get your requirement at all. If you have two applications
> anyway, they run in separate processes already. A thread represents
> parallel code paths *inside* a process. How do you envision running an
> application in another thread?
The old way: starting of a thread and replace it with another app. Don't
remember the actual posix functions...
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100622/2342442f/attachment.bin
More information about the Qt-interest-old
mailing list