Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, April 2007
A curiosity about QApplication


Message 1 in thread

Reading the QT offical guide (http://doc.trolltech.com/3.3/threads.html) we
can found the following statement:

"Qt does not support creating QApplication and running the event loop (with
QApplication::exec()) in a secondary thread. You must create the
QApplication object and call QApplication::exec() from the main() function
in your program."

It's a matter of curiosity... but why shouldn't QApplication::exec work if
called in a secondary thread? Is the main thread "special"  somehow? As far
as I know Linux mangages all threads in the the same way, so why should this
be a problem?

Message 2 in thread

Hi,

> It's a matter of curiosity... but why shouldn't QApplication::exec work 
> if called in a secondary thread? Is the main thread "special"  somehow? 
> As far as I know Linux mangages all threads in the the same way, so why 
> should this be a problem?

I don't think this limitation is related to Linux - rather Mac OS if I recall 
correctly.

--
 [ signature omitted ]