void Scene::mouseMoveEvent(QGraphicsSceneMouseEvent *event){ QGraphicsEllipseItem*e = new QGraphicsEllipseItem(event->scenePos().x(),event->scenePos().y(),20,20,0,this); e->setBrush(QBrush(Qt::green)); e->setPen(Qt::NoPen);}
QGraphicsLineItem*l = new QGraphicsLineItem(event->lastScenePos().x(),event->lastScenePos().y(),event->scenePos().x(),event->scenePos().y(),0,this); QPen p; p.setBrush(QBrush(currentColor)); p.setWidth(20); p.setCapStyle(Qt::RoundCap); l->setPen(p);