title: Displaying Gif Loading in PyQt4
body: <p>I am trying to display a loading gif while other code executes. I am very unfamiliar with PyQt and have tried following the code at <a href="https://www.unlogic.co.uk/2012/11/02/show-animated-gifs-using-pyqt/" rel="nofollow noreferrer">this</a> link, which seems to be the standard way of executing a gif. I only want the gif playing and do not want a button. Here is the code I am currently at, but it is very poor. </p>
  
  <pre><code>self.movie = QMovie(coffeeloading.gif, self)
  size = self.movie.scaledSize()
  self.movie_screen.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
  self.movie_screen.setAlignment(Qt.AlignCenter)
  self.movie_screen = QLabel()
  main_layout = QVBoxLayout()
  main_layout.addWidget(self.movie_screen)
  self.setLayout(main_layout)
  self.movie.setCacheMode(QMovie.CacheAll)
  self.movie.setSpeed(100)
  self.movie_screen.setMovie(self.movie)
  self.movie.start()
  </code></pre>
  
  <p>This is supposed to execute after a button press and fill up the whole screen of 240x320, but I dont have any idea how to do it. I have already read through many of the other stackoverflow and other links, but none of them seem to address how to complete this.</p>