Question

I have a certain QWidget derived class.

Look at the window flags i'm giving it. In my app it functions like the drop down component of the combo box:

setWindowFlags(Qt::FramelessWindowHint | Qt::Popup);

With Qt 4.7.4, the "FocusOutEvent" is called when I click outside of the widget, even if the click is on the window caption. I use the event to hide my widget. That's the desired behavior I'd like to see. With 4.8 however, "FocusOutEvent" is never called when clicking outside my widget on non-focus receiving elements and/or my window caption, thus, it still sticks around. I can actually drag the window away from my still-visible popup widget.

Something changed in Qt 4.8. Is there a way around it?

Was it helpful?

Solution

There is a workaround, suggested by Volker, a major Qt Contributor: http://developer.qt.nokia.com/forums/viewthread/14264

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top