Hello,
postEvent() is called from a separate thread, where as customEvent() is in main thread, After the postEvent() method called from thread , customEvent() of reciever is not receiving the event.
Regards,
node_ex.
Hello,
postEvent() is called from a separate thread, where as customEvent() is in main thread, After the postEvent() method called from thread , customEvent() of reciever is not receiving the event.
Regards,
node_ex.
Last edited by node_ex; 24th June 2008 at 16:13.
Try to provide more information. I've used it in a few projects and I never had problems with it. Did you pass something between QEvent::User and QEvent::MaxUser as event type?
J-P Nurmi
Hi,
Thanks for the reply.
I am converting Qt3 application to Qt4 application . Here application didn't call QApplication::exec() fn before calling postEvent fn.
Event is passed by using QCustomEvent class .
QApplication:ostEvent(QObject*,QCustomEvent*) is called in thread( which is not inherited from QThread ... basic c++ thread using pthread_create() function). customEvent(QCustomEvent*) function is located in the respected QObject class. This customEvent is not getting called after postEvent method is invoked.
The same worked in Qt3, but not working in Qt4..
Regards,
node_ex.
In Qt4 there is no virtual method customEvent that takes a QCustomEvent pointer.
hi,
I used QEvent in place of QCustomEvent class and application works good.
Thanks for your prompt help.
Regards,
node_ex.
Bookmarks