Timestamp of saved Pixmap wrong
-
Hello,
if have a folder with png's and delete them with the following code:QDir dir(path, { "*.png" }); for (const QString & filename : dir.entryList()) { dir.remove(filename); }
After that I create new pixmap png's in the following way:
(images have the same name)QPixmap pixmap; pixmap.save(fileName, "PNG");
As a result the images are deleted, the new images are written, but the
timestamp of the new images are wrong. Some (not all) have the timestamp of
the pictures before the deletion.
Its the same for windows 7 and windows 10. It seems, its a windows problem but it confuses the user.What is the way of doing this right? What could be a possible workaround?
-
Hello,
if have a folder with png's and delete them with the following code:QDir dir(path, { "*.png" }); for (const QString & filename : dir.entryList()) { dir.remove(filename); }
After that I create new pixmap png's in the following way:
(images have the same name)QPixmap pixmap; pixmap.save(fileName, "PNG");
As a result the images are deleted, the new images are written, but the
timestamp of the new images are wrong. Some (not all) have the timestamp of
the pictures before the deletion.
Its the same for windows 7 and windows 10. It seems, its a windows problem but it confuses the user.What is the way of doing this right? What could be a possible workaround?
-
Hello,
if have a folder with png's and delete them with the following code:QDir dir(path, { "*.png" }); for (const QString & filename : dir.entryList()) { dir.remove(filename); }
After that I create new pixmap png's in the following way:
(images have the same name)QPixmap pixmap; pixmap.save(fileName, "PNG");
As a result the images are deleted, the new images are written, but the
timestamp of the new images are wrong. Some (not all) have the timestamp of
the pictures before the deletion.
Its the same for windows 7 and windows 10. It seems, its a windows problem but it confuses the user.What is the way of doing this right? What could be a possible workaround?
@TauCeti said in Timestamp of saved Pixmap wrong:
but the
timestamp of the new images are wrongWhat timestamp do you mean? Creation time? Modification time? Last access time?