1

I have a C++ app which pops up a QDockWidget. I want this widget to close when the user clicks outside the widget, and have achieved this using the eventFilter() to catch the event QEvent::WindowDeactivate, and call Hide().

I also need the QDockWidget to close when the user changes desktop - and this doesn't require a mouse click. (Windows virtual desktop).

I've looked for some other appropriately named QEvent but no luck. My QDockWidget allows user input via keyboard, so I can't use keyboard focus for hiding.

What signal or event could I watch for to Hide() when a user changes windows desktop?

Supr
  • 11
  • 1

0 Answers0