Am 20.01.2014 14:47 schrieb "Michael Schnell" <[email protected]>: > > On 01/20/2014 11:01 AM, Michael Van Canneyt wrote: >> >> >> >> >> >> http://qt-project.org/doc/qt-4.8/threads-starting.html >> >> "Note that QCoreApplication::exec() must always be called from the main thread >> (the thread that executes main()), not from a QThread. In GUI applications, >> the main thread is also called the GUI thread because it's the only thread >> that is allowed to perform GUI-related operations." >> > > I didn't think that in Linux with NPTL there not even is a thing like a "main thread" of a program, but (before binding to a GUI provider) all threads of a project are equivalent. As a consequence, multiple of them should be able to be bound to a GUI provider instance - as long as same does not impose global variable.
For Qt the main thread is the thread that first called QCoreApplication::exec() (or that first constructed a QCoreApplication instance? I'd need to check that again...). This is ensured using the thread's ID. Regards, Sven
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
