PDA

View Full Version : how to call parent widget's event ?



rajeshs
20th December 2007, 12:12
I want to call parent widget's event from child widget .

I am having eventfilter in QDialog , in that i am checking keypress event and if it is up key i am doing some actions , i am having my own widget placed in that QDialog , from my child widget i want to call the up event explicitly ,

This is like sendMessage() in VC++.

How to do this in qt?

can we use emit() forthis ? if yes , how to call events using emit()?

wysota
20th December 2007, 12:39
QCoreApplication::postEvent() or QCoreApplication::sendEvent() are used to hmm... post or send events. If you are inside an event handler and you only want to propagate the event to parent, simply QEvent::ignore() the event.