I reimplement my custom QGraphicsProxyWidget and i add it in my custom scene.
I reimplement the mousemove, mousepress and mouserelease event but i can't move it in my scene......why???

here the code:
Qt Code:
  1. void myproxy::mouseMoveEvent(QGraphicsSceneMouseEvent *event){
  2. QGraphicsProxyWidget::mouseMoveEvent(event);
  3. }
  4. void myproxy::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent){
  5. QGraphicsProxyWidget::mouseReleaseEvent(mouseEvent);
  6. }
  7. void myproxy::mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ){
  8. scene()->clearSelection();
  9. setSelected(true);
  10. setCursor(Qt::ClosedHandCursor);
  11.  
  12. QGraphicsProxyWidget::mousePressEvent(mouseEvent);
  13. }
To copy to clipboard, switch view to plain text mode 

i also set this flag in the constructor:
Qt Code:
  1. setFlag(QGraphicsProxyWidget::ItemIsMovable, true);
  2. setFlag(QGraphicsProxyWidget::ItemIsSelectable, true);
  3. setFlag(QGraphicsProxyWidget::ItemIsFocusable, true);
To copy to clipboard, switch view to plain text mode