[Interest] Event handling for QObjects created before QApplication

Thiago Macieira thiago.macieira at intel.com
Mon Sep 22 02:46:34 CEST 2014


On Monday 22 September 2014 04:24:21 Dmitrii Volosnykh wrote:
> Threads and QObjects
> <http://qt-project.org/doc/qt-5/threads-qobject.html> tutorial
> 
> says:
> > Note that for QObjects that are created before QApplication,
> > QObject::thread() returns zero. This means that the main thread will only
> > handle posted events for these objects; other event processing is not done
> > at all for objects with no thread.
> 
> Could someone elaborate on this, please? The most confusing part is "main
> thread will only handle posted events for these objects".

Qt is not supported before the creation of QCoreApplication. Your use-case is 
not supported, so no answer is necessary.

Just don't do it.

Note: the doc is wrong.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list