Post a minimal, self-contained program that reproduces the error.
If by "temp file" you mean a file managed by QTemporaryFile, then renaming it will likely fail because QTemporaryFile maintains the file in an open state and Windows does not like renaming open files.
Bookmarks