PDA

View Full Version : super modal window!!



jrodway
17th April 2008, 13:48
Hello,

I'd like to put a window on top of the desktop so nobody can interact with other applications below that window.

The user only should can interact with the others windows (of other applications) when the top window will be closed.

How to do it...???

Thanks in advance!!

momesana
17th April 2008, 14:41
Maybe Qt::WindowStaysOnTopHint ?
It's a WindowFlag so you either pass it when you construct the window or set it later via setWindowFlags().

aamer4yu
17th April 2008, 15:30
QWidget::setWindowModality might help you :)

jrodway
17th April 2008, 20:52
Thanks for the answer, but it's only for control a window for one application. I need control all windows in the Desktop of several application. When this window is on the screen the user only will can interact with this window and will not interact with others windows of other applications (the user we can't use them)

thanks!!!

wysota
17th April 2008, 21:25
Theoretically there is no way to do what you want :) You may try to cheat by making your window full screen, but as long as the user will be able to kill your application or use alt+tab, you won't be able to force him to stay within your app. So either intercept all events on the X server or cooperate with the window manager to lock the screen using its techniques (with KDE you can use dcop for that).