+ int finalX = qBound(sceneRectangle.left(),newx,sceneRectangle.right()-pixmap().width());
+ int finalY = qBound(sceneRectangle.top(),newy,sceneRectangle.bottom()-pixmap().height());
+
+
+ setPos(QPointF(finalX,finalY));
+
+// QPropertyAnimation * animation = new QPropertyAnimation(this,"pos",this);
+// animation->setDuration(60); //milliseconds
+// animation->setStartValue(pos());
+// animation->setEndValue( QPointF(finalX,finalY));
+// animation->start(QAbstractAnimation::DeleteWhenStopped);