I am trying to mark points on top of a image,
- I select the topleft and bottomright points on the image
- generate grid points on top of the image (something like this )
http://img169.imageshack.us/img169/9...otfigure11.jpg
- the grid should be cleared later

currently i created a ImageItem class derived from QpixmapItem
Qt Code:
  1. #ifndef IMAGEITEM_H
  2. #define IMAGEITEM_H
  3.  
  4. #include <QGraphicsPixmapItem>
  5. #include <QtDebug>
  6. #include <QGraphicsSceneMouseEvent>
  7. #include <QPoint>
  8. #include <QPainter>
  9. #include <QObject>
  10.  
  11. class ImageItem : public QObject ,public QGraphicsPixmapItem
  12. {
  13. Q_OBJECT
  14. public:
  15. ImageItem();
  16. ImageItem(QGraphicsItem *, QGraphicsScene*);
  17. public slots:
  18. void mousePressEvent(QGraphicsSceneMouseEvent *event);
  19. signals:
  20. void mouseClicked(QPointF);
  21.  
  22. };
  23.  
  24. #endif // IMAGEITEM_H
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. #include "imageitem.h"
  2.  
  3. ImageItem::ImageItem()
  4. {
  5. }
  6.  
  7. ImageItem::ImageItem(QGraphicsItem *parent, QGraphicsScene* scene) : QGraphicsPixmapItem(parent,scene){
  8.  
  9. }
  10.  
  11. void ImageItem::mousePressEvent(QGraphicsSceneMouseEvent *event){
  12. emit mouseClicked(event->pos());
  13. }
To copy to clipboard, switch view to plain text mode 

i can get the topleft and bottomright points from the mousePressEvent
Now my problem is how can i draw points (which can be removed later) on top of QPixmapItem??

any ideas how to implement this? or if u have a sample code please share