Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QGraphicsScene + drawing a point



  • I want to create an editor like paint and have one problem with creating a pencil tool.
    I am creating a new class:
    @class GraphicsScene : public QGraphicsScene@
    and overwriting mouseMoveEvent:
    @void GraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
    {
    addEllipse(event->scenePos().x()-0.5,event->scenePos().y()-0.5, 1, 1);
    }@
    and as result I have:
    http://xmages.net/i/3270910

    Is it possible to do like this with QGraphicsScene and QGraphicsView?
    http://xmages.net/i/3270918



  • If you want to "connect the dots", so to speak, why did you decide to use an ellipse, rather than a line segment?


Log in to reply