Trying draw circles in PyQt5 -
i want implement following: when press left mouse button in part of main window the circles having concrete radius must appear. unfortunately nothing occurs.
to avoid displaying of source code can show important event part of it:
def pressleftmousebutton(self, event): leftmousebutton=qtcore.qt.leftbutton if event.button() == leftmousebutton: painter=qtgui.qpainter(self) centerx=event.x() centery=event.y() painter.setpen(qtcore.qt.black) painter.drawellipse(centerx, centery, 40, 40)
thank you! luck!
Comments
Post a Comment