nackasha
22nd October 2011, 02:26
Hello,
So here is my problem: I created a widget and want to make sure it is always on top. If a user change to another window using alt+tab then it doesn't allow him and go back to my widget.
If you ask why i am doing this then i am creating a university test program in which i want to prevent the user from doing anything in the computer such as closing the window or jumping to another window. I learned that i can override CloseEvent to tackle the closing issue but now am I to keep the window on top ?
Ive done the following:
1- create the widget (done)
2- show widget fullscreen (done)
3- exec the widget (done)
how can i proceed to keep making it on top ?
My thought is:
- initialize a timer of let's say 10 milliseconds
- signal slot when timeout to a function that set the window on top.
Hence, if the user changed the screen then within when the timer shoots it goes back to my widget so i can accomplished what i want.
This idea works with window handles when I show an image but not a widget. Can i do same thing to widget ?
Please advice
Many thanks
Louis
So here is my problem: I created a widget and want to make sure it is always on top. If a user change to another window using alt+tab then it doesn't allow him and go back to my widget.
If you ask why i am doing this then i am creating a university test program in which i want to prevent the user from doing anything in the computer such as closing the window or jumping to another window. I learned that i can override CloseEvent to tackle the closing issue but now am I to keep the window on top ?
Ive done the following:
1- create the widget (done)
2- show widget fullscreen (done)
3- exec the widget (done)
how can i proceed to keep making it on top ?
My thought is:
- initialize a timer of let's say 10 milliseconds
- signal slot when timeout to a function that set the window on top.
Hence, if the user changed the screen then within when the timer shoots it goes back to my widget so i can accomplished what i want.
This idea works with window handles when I show an image but not a widget. Can i do same thing to widget ?
Please advice
Many thanks
Louis