Weird behavior at application startup - "QObject: Cannot create children for parent that is in a different thread" but there is just one thread - promise!
-
Hello,
colleague of mine got some strange behavior at application startup.
He has a Object derived from QCoreApplication (- lets call it MyApp) and tries to instantiate a child object in with MyApp as a parent. Doing this results in the above-named warning - but there is no other thread than the main thread in the process - i've checked it. Twice!Any idea about this?
Cheers, -
Hi,
What exactly are you creating there ?
-
You need to show some code.
Was QCoreApplication constructor called?
You might get such effect if it was not or other QObjects were instantiated before QCoreApplication was constructed.