title: How to add background image Animation in PyQt5 QPropertyAnimation in Python
body: <p>I have done the following code for window animation but i am unable to display the background image in it</p>
  <pre><code>import sys
  from PyQt5.QtWidgets import (QApplication, QWidget, QPushButton,QVBoxLayout)
  from PyQt5.QtCore import QRect, QPropertyAnimation
  from PyQt5 import QtCore ,QtGui
  from pyautogui import size
  
  # GETTING SCREEN RESOLUTION
  
  width , height = size()
  
  class AppDemo(QWidget):
      
      def __init__(self):
          super().__init__()
  
          # SETTING WINDOW GEOMETRY FOR ANIMATION 
  
          self.baseHeight = 0
          self.extendedHeight = height
          self.baseWidth = 0
          self.extendedWidth = width
          self.rect = QRect(0,0, self.baseWidth, self.baseHeight)
          self.setGeometry(self.rect)
  
          # CREATING FRAMELESS WINDOW
  
          flags = QtCore.Qt.WindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.WindowStaysOnTopHint)
          self.setWindowFlags(flags)
          self.setStyleSheet(&quot;*\n&quot;
  &quot;{\n&quot;
  &quot;background-image:url(BACKGROUND.jpg);\n&quot;
  &quot;}&quot;)
          self.resizeWindow()
  
      #THE ANIMATION EFFECT 
  
      def resizeWindow(self):
              
          currentHeight = self.height()
          currentWidth = self.width()
  
          if self.baseHeight == currentHeight and self.width() == currentWidth:
              baseHeight = self.baseHeight
              baseWidth = self.baseWidth
              extendedHeight = self.extendedHeight
              extendedWidth = self.extendedWidth
          else:
              baseHeight = self.extendedHeight
              baseWidth = self.extendedWidth
              extendedHeight = self.baseHeight
              extendedWidth = self.baseWidth    
          # STARTING ANIMATION
  
          self.animation = QPropertyAnimation(self, b'geometry')
          self.animation.setDuration(800)
          self.animation.setStartValue(QRect(0, 0, baseWidth, baseHeight))
          self.animation.setEndValue(QRect(0, 0, extendedWidth, extendedHeight))
          self.animation.start()
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
  
      demo = AppDemo()
      demo.show()
  
      sys.exit(app.exec_())
  </code></pre>