PDA

View Full Version : Close child dialog when click outside of it



warcraff123456
6th April 2013, 09:57
I have 2 dialogs: a parent dialog and child dialog (see image).
8889
When user open the child dialog, parent dialog will be blurred. I want to close the child dialog when user clicks inside parent dialog (but outside of the child dialog). I tried to reimplement mousePressEvent of child dialog but nothing happens!

Can anyone guide me how to do this?

Thank you very much.

wysota
6th April 2013, 10:18
The easiest way to do it is to make your child window a Qt::ToolTip, if I remember correctly. In doubt see in Qt source code how to use this flag.