import sys
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow, QLabel
from PyQt5.QtGui import QPainter, QColor, QPen
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import Qt
import random
 
class App(QMainWindow):
 
    def __init__(self):
        super().__init__()
        self.title = 'Catch Pyxel'
        self.left = 100
        self.top = 100
        self.width = 800
        self.height = 600
        self.initUI()
 
    def initUI(self):
        self.setWindowTitle(self.title)
        self.setGeometry(self.left, self.top, self.width, self.height)
 
        # Set window background color
        self.setAutoFillBackground(True)
        p = self.palette()
        p.setColor(self.backgroundRole(), Qt.white)
        self.setPalette(p)
 
        # Add paint widget and paint
        self.m = PaintWidget(self)
        self.m.move(0,0)
        self.m.resize(self.width,self.height)
 
        self.show()
 
 
class PaintWidget(QWidget):
   def paintEvent(self, event):
      qp = QPainter(self)
      qp.drawImage()
      #qp.setPen(Qt.black)
      #size = self.size()
# 
 #     for i in range(1024):
 #         x = random.randint(1, size.width()-1)
 #         y = random.randint(1, size.height()-1)
  #        qp.drawPoint(x, y)
 
 
if __name__ == '__main__':
    app = QApplication(sys.argv)
    ex = App()
    sys.exit(app.exec_())
    