title: PyQt QMovie will not loop GIF
body: <p>I have a working example of playing a <strong>gif</strong>, but it isn't looping the GIF. Even i changed <strong>movie.setCacheMode(QMovie.CacheAll)</strong></p>
  
  <p>Any Idea?
  <img src="https://i.stack.imgur.com/IgCgU.gif" alt="enter image description here"> -->Animated Gif</p>
  
  <pre><code>from PyQt4 import QtCore, QtGui
  from PyQt4.QtGui import *
  from PyQt4.QtCore import *
  
  import sys
  
  class ImagePlayer(QWidget):
      def __init__(self, filename, title, parent=None):
          QWidget.__init__(self, parent)
  
          # Load the file into a QMovie
          self.movie = QMovie(filename, QByteArray(), self)
  
          size = self.movie.scaledSize()
          self.setGeometry(200, 200, size.width(), size.height())
          self.setWindowTitle(title)
  
          self.movie_screen = QLabel()
          # Make label fit the gif
          self.movie_screen.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
          self.movie_screen.setAlignment(Qt.AlignCenter)
  
          # Create the layout
          main_layout = QVBoxLayout()
          main_layout.addWidget(self.movie_screen)
  
          self.setLayout(main_layout)
  
          # Add the QMovie object to the label
          self.movie.setCacheMode(QMovie.CacheAll)
          self.movie.setSpeed(100)
          self.movie_screen.setMovie(self.movie)
          self.movie.start()
          self.movie.loopCount()
  
  
  if __name__ == "__main__":
      gif = "dotGreen.gif"
      app = QApplication(sys.argv)
      player = ImagePlayer(gif, "was")
      player.show()
      sys.exit(app.exec_())
  </code></pre>