PDA

View Full Version : Screen Flashing



arunvv
28th July 2008, 22:23
I created several screens using stacked widget. And I want one screen to be flashed, like warning.
How can I make a screen flashing using Qtopia-4.2.2?

Thanks & Regards,
Arun.

jacek
28th July 2008, 22:36
How is that flashing supposed to look exactly?

arunvv
29th July 2008, 00:46
It should be like whenever I click a button , based on stack widget index it takes to a particular screen, where I will be having a BMP on a label. As soon as I go to that screen it should flash. I tried by changing the background color of a label, it is working, but it seems to be re-painting. Not as flashing. Flashing should appear like, flashing not as a repainting.

This is what I am looking for? How can I do it?

Thanks & Regards,
Arun.

arunvv
29th July 2008, 18:52
Any suggestions on screen flashing?

jpn
29th July 2008, 19:04
It's still not clear what you mean with flashing and repainting. If you set a certain background color, that will be the background color and that's it. If you want the background color to fade from one color to another, do it with a timer.

arunvv
29th July 2008, 20:17
Hi JPN,
Thanks for your quick reply,

I am looking for a class or a function which will do flashing on a particular widget.
I am trying to make label widget flashing, I tried changing background color with red and gray color for every 10msec timeout. Even then it seems to be appears as a repainting as it is supposed to do. But i don't want this type, I want something which looks like flashing.

Is there any function or method for flashing in Qt? flashing in the sense blinking always as kind of threat warning, in the background.

Thanks & Regards,
Arun

JimDaniel
29th July 2008, 20:41
Do you want a widget to flash or a QLabel specifcially to flash? In either case all you need to do is start a timer for the refresh time and in the timerEvent() alternate the colors you want.

Its not very clear what you mean when you say, "even then it seems to be appears as a repainting as its supposed to do. but I don't want this type, I want something which looks like flashing."

Maybe this is sort of what you're after, but instead of setting a new icon pixmap you want to set a color:

http://www.qtcentre.org/forum/f-newbie-4/t-make-a-jpg-or-bmp-picture-into-a-widget-14011.html

arunvv
29th July 2008, 22:45
Hi Jim,

Thanks for your info.