cancel
Showing results for 
Search instead for 
Did you mean: 

Blinking an image

Professional
Senior

Hello

is it possible to make an image blink with the animated image widget (it seem that we need 2 images, but i only have one image to make it blink : it ON or OFF every 500ms)

thanks

best regards

4 REPLIES 4
Martin KJELDSEN
Chief III

Hi,

You could simply, in the handleTickEvent() method of your view (virtual), count ticks (1 tick =~ 16.66 ms) and then call .setVisible(true) or setVisible(false) on your Image (Not Animated Image).

Hope this helps,

Best regards

Martin

Hello

thanks for your reply, but how can i declare handleTickEvent()

i tried :

void HomeView::handleTickEvent()

{

}

in my view .cpp, but doesn't compile

Hello

OK thanks i have found an example

best regards

Great 🙂 Just to be specific - You probably needed the declaration of the method in your header file. And from there on you could just use modulo to flip the image visible and invisible.