View Full Version : Intercept ShowDesktop event
Lele
20th December 2007, 17:10
Hi,
maybe thi is Windows specific.
Is there a way to intercept the ShowDesktop event inside a qt application.
I would like to minimize my window when that happens.
I'm using a frameless window, so I would like the same behaviour as an ordinary window.
bye
wysota
20th December 2007, 17:21
If it is sent as a Windows native event, you can reimplement QWidget::winEvent() or QCoreApplication::winEventFilter().
Lele
20th December 2007, 17:40
Yes, I tried that but I'm not sure I can intercept that particular event.
Maybe that one is more related to the QApplication rather than the widget.
thanks
marcel
20th December 2007, 18:16
It might be forwarded only to top level widgets(main windows), because it makes no sense to send such an event to a child widget.
So try catching it in the main window's winEvent.
wysota
20th December 2007, 20:05
Applying a filter on the application object should work. You should intercept all such events passing through the application this way.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.