Hi,

I have a QGraphicsScene on which I would like to draw some special curves. I made a class in which I define these special curves as a new QGraphicsItem:

Qt Code:
  1. class Clothoid : public QGraphicsItem
  2. {
  3. public:
  4. Clothoid(QPoint startPoint, QPoint endPoint);
  5. virtual ~Clothoid();
  6. ...
  7.  
  8. protected:
  9. QRectF boundingRect() const;
  10. void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
  11.  
  12. };
To copy to clipboard, switch view to plain text mode 

and I try to insert each item twice: once in an array I defined:

Qt Code:
  1. QList<Clothoid *> clothoids;
To copy to clipboard, switch view to plain text mode 

and once in the scene:

Qt Code:
  1. void renderArea::updateClothoid(const QPoint &p1, const QPoint &p2)
  2. {
  3. Clothoid *temp = new Clothoid(p1, p2);
  4.  
  5. clothoids.append(&temp);
  6.  
  7. scene->addItem(&temp);
  8. }
To copy to clipboard, switch view to plain text mode 

But I get these 2 errors:

no matching function for call to 'QList<Clothoid*>::append(Clothoid**)'

and

no matching function for call to 'QGraphicsScene::addItem(Clothoid**)'

What am I doing wrong?