Details
-
Bug
-
Resolution: Won't Do
-
P4: Low
-
None
-
6.6.0
-
None
-
Windows 11 Home version 23H2
-
-
f5744f1b4 (dev)
Description
Use of a file (e.g. a .gif file) by a QMovie object is not ended when QMovie.stop() is called. The symptom I am experiencing is that a windows PermissionError is thrown when I try to delete the .gif file, beacuse pthon.exe is still 'using' the .gif file. This PermissionError persists even after the QMovie.stop() method is called. The expected behaviour is that I should be able to delete the .gif file without triggering the PermissionError if the QMovie is not currently playing.
Deleting the QMovie using QMovie.deleteLater() does solve the error.
Apologies if the deleteLater() method is the appropriate way to get python to stop 'using' the .gif file. I am a coding beginner. I was recommended to report this issue here by a more experienced developer who answered my question on stackoverflow.
The more experienced developer who helped me said:
"It's a bug of PySide6. When you call the QLabel.setMovie(), as you can see in the source, the binding library assumes the label owns the movie, but the C++ implementation doesn't make it happen actually. What about reporting the bug on here?"
Attachments
For Gerrit Dashboard: PYSIDE-2808 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
575055,3 | Add Fixme comment about QLabel::setMovie() | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |