Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsScene + drawing a point
Forum Updated to NodeBB v4.3 + New Features

QGraphicsScene + drawing a point

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AlricDoRei
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris H
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved