PDA

View Full Version : Mouse & KeyBoard Event



anafor2004
26th October 2009, 07:59
Dear Friends,
I have a small problem, I want to close a QDialog if there is a MouseEvent in my application.
There are many Widget's and Buttons , I want to detect MouseEvent before them and close the dialog box, How can I do that? Can I detect mouseRelease or press event on QApplication.

wysota
26th October 2009, 08:20
Install an event filter on the application object.

kavinsiva
26th October 2009, 11:39
if you want to close particular Dialog hard code like that



void className::mousePressEvent(QEvent *event)
{

dialogName->close();

}