Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2808

QMovie file use and parenting

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P4: Low
    • None
    • 6.6.0
    • PySide
    • None
    • Windows 11 Home version 23H2
    • Windows
    • 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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            tranquille Matthew Riding
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes