Hi All,

I'm trying to follow this tutorial: http://www.informit.com/articles/art...74421&seqNum=4
Works pretty well until the point when I try to draw a line between my two rectangles. The position from my two nodes seem to be off.
I've recorded a video to explain the problem a little better ( Sorry for the video quality :/ ) :


Selecting 480p makes the text somewhat readable. The rectangle is always showing the current position in the scene, which is the same that is used to set the lines position.

Here's the code for setting the line:
Qt Code:
  1. void Link::trackNodes()
  2. {
  3. setLine(QLineF(myFromNode->pos(), myToNode->pos()));
  4. }
To copy to clipboard, switch view to plain text mode 

And here's how I setup the scene:
Qt Code:
  1. //Set-up the scene
  2. QGraphicsScene* scene = new QGraphicsScene(this);
  3. //Set-up the view
  4.  
  5. QGraphicsRectItem *scene_rect_item = new QGraphicsRectItem();
  6. QRectF scene_rect(0,0, 300, 300);
  7. scene_rect_item->setRect(scene_rect);
  8. setSceneRect(scene_rect);
  9. scene->addItem(scene_rect_item);
  10.  
  11. setDragMode(QGraphicsView::RubberBandDrag);
  12. setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform);
  13. setContextMenuPolicy(Qt::ActionsContextMenu);
  14.  
  15. setScene(scene);
To copy to clipboard, switch view to plain text mode 

Any ideas what might cause this?

Thank you in advance!