Hi, I'm creating an image viewer. It allows the user to modify any image by opening a simple image editor (created using Qt, too). Everytime that the editor is closed, the image viewer has to check if the current image that the user is viewing has been modifed and update it in this case. My question is what's the best way to know when an image has been modified? I've thought in two solutions: 1) emiting a signal from the image editor everytime that an image file has been modified with it's name. 2) Check, when the image editor is closed, if the date that QFIleInfo::lastModified returns from the current image file if it's greater than the date when the editor was opened, for example. With the second method the image viewer only has to check one time if the file has been modified, but I'm not sure if calling QFileInfo::lastModified() is portable through all platfforms (I have a suspicious that it doesn't works with win98...). Which method do you think that it's better?
Bookmarks