title: PyQt5 - How to draw a dot on mouse click position?
body: <p>I am trying to draw a dot on my main window, but the dot is not shown.</p>
  
  <p>I've tried bounding <code>mousePressEvent</code> to <code>paintEvent</code>, but it didn't work as well. Here's current version of my code(which is not working too). Also I tried place a point with <code>drawPoint</code> method and it didn't work too.</p>
  
  <pre><code>import sys
  from PyQt5 import QtWidgets, QtGui, QtCore, uic
  
  
  class GUI(QtWidgets.QMainWindow):
      def __init__(self):
          super().__init__()
          uic.loadUi('gui.ui', self)
          self.setFixedSize(self.size())
          self.show()
  
      def mousePressEvent(self, e):
          print(e.pos())
          qp = QtGui.QPainter()
          qp.begin(self)
          qp.setPen(QtCore.Qt.red)
          qp.drawEllipse(e.pos().x(), e.pos().y(), 10, 10)
          qp.end()
          self.update()
  
  
  if __name__ == '__main__':
      app = QtWidgets.QApplication(sys.argv)
      window = GUI()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>I know that <code>mousePressEvent</code> is working since I get coords of the click.</p>
  
  <p>I am okay to change methods of dot-placing or type of dots to place, but it should have customizable color and size.</p>