PDA

View Full Version : QCoreApplication::postEvent: Unexpected null receiver



mortoray
14th November 2010, 12:14
I have a dialog which contains a tab widget with many further widgets. When I "accept" this dialog I get the "QCoreApplication::postEvent: Unexpected null receiver" warning. If I a "reject" the dialog I don't get the warning.

I'm not sure what causes this warning. Worse I don't know where to locate the warning.

Does somebody have some more information on what exactly may cause this warning?

Or is there someway to get QT to emit /useful/ information, such as which message is being posted?

kornicameister
14th November 2010, 20:26
there is this macro
Q_Assert which can print out some useful debugging information
but I think you can find Q_ASSERT_X even more useful

these won't of course solve the problem, but I assume they may be helpful in locating it

I will not try to explain what the warning means, because docs have this issue explained really weird and I don't understand a thing

wysota
14th November 2010, 21:10
I have a dialog which contains a tab widget with many further widgets. When I "accept" this dialog I get the "QCoreApplication::postEvent: Unexpected null receiver" warning. If I a "reject" the dialog I don't get the warning.

I'm not sure what causes this warning. Worse I don't know where to locate the warning.
Some code of yours references an object that gets deleted as a result of closing the dialog (like the dialog object itself).

kornicameister
14th November 2010, 22:14
@wysota

documentation stands that events are located on the heap(in the queue), and are deleted from it after being posted
is this mean, that he tries to access the event which references an object actually already deleted ?