{
if(event->button() == Qt::LeftButton)
point1->setX(event->x());
point1->setY(event->y());
this->repaint();
}
void MainWindow::paintEvent(QPaintEvent *)
QPainter painter(this);
painter.drawEllipse(point1->x(),point1->y(),15,15);
代碼寫的渣 不要見怪