PDA

View Full Version : Question about updating an image on screen



SkripT
24th February 2006, 18:49
Hi all, I've implemented an image viewer. The image that is viewed should be updated everytime because this image could be modified while the image is shown in other parts of my program (an image editor for example). Currently, I've implemented it with a timer: I save the date when the image is shown on screen and start the timer. Then, at every 5 seconds the timer triggers a signal connected to a slot where I look up if the date of the last modification of the image is later than the date when the image has been updated for the last time. I would like to know if this is the best way to implement this behaviour or if anybody suggests me another. Thanks.

jacek
24th February 2006, 19:01
You can also use a signals to notify all widgets/objects about the change.