title: python resizing a Qpainter
body: <p>i have tried to change the size of my Qpainter and i can't figure out how could someone help here is my code i have looked online and i cant figure it out since the code i need is embedded in a shit tone of other code that is not needed thanks for your help.</p>
  
  <pre><code>import sys
  import os
  from PyQt4.QtCore import QSize, QTimer
  from PyQt4.QtGui import QApplication,QGraphicsRectItem , QMainWindow, QPushButton, QWidget, QIcon, QLabel, QPainter, QPixmap, QMessageBox, QAction, QKeySequence, QFont, QFontMetrics, QMovie
  from PyQt4 import QtGui
  
  
  class UIWindow(QWidget):
      def __init__(self, parent=None):
          super(UIWindow, self).__init__(parent)
          self.resize(QSize(400, 450))
  
      def paintEvent(self, event):
          painter = QPainter(self)
          painter.drawPixmap(self.rect(), QPixmap("Images\Image.png"))
          painter.move(0,0)
          painter.resize(950,270)
  
  
  
  
  class MainWindow(QMainWindow,):
      def __init__(self, parent=None):
          super(MainWindow, self).__init__(parent)
          self.setGeometry(490, 200, 950, 620)
          self.setFixedSize(950, 620)
          self.startUIWindow()
          self.setWindowIcon(QtGui.QIcon('Images\Logo.png'))
  
      def startUIWindow(self):
          self.Window = UIWindow(self)
          self.setWindowTitle("pythonw")
          self.setCentralWidget(self.Window)
          self.show()
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      w = MainWindow()
      sys.exit(app.exec_())
  </code></pre>