|
|
@ -181,7 +181,7 @@ void UBGraphicsItemDelegate::setMimeData(QMimeData *mimeData) |
|
|
|
|
|
|
|
|
|
|
|
bool UBGraphicsItemDelegate::mouseMoveEvent(QGraphicsSceneMouseEvent *event) |
|
|
|
bool UBGraphicsItemDelegate::mouseMoveEvent(QGraphicsSceneMouseEvent *event) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if((NULL != mMimeData) && ((event->pos() - mDragStartPosition).manhattanLength() < QApplication::startDragDistance())) |
|
|
|
if(mMimeData) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QDrag* mDrag = new QDrag(event->widget()); |
|
|
|
QDrag* mDrag = new QDrag(event->widget()); |
|
|
|
mDrag->setMimeData(mMimeData); |
|
|
|
mDrag->setMimeData(mMimeData); |
|
|
@ -200,8 +200,12 @@ bool UBGraphicsItemDelegate::mouseMoveEvent(QGraphicsSceneMouseEvent *event) |
|
|
|
event->accept(); |
|
|
|
event->accept(); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool UBGraphicsItemDelegate::weelEvent(QGraphicsSceneWheelEvent *event) |
|
|
|
bool UBGraphicsItemDelegate::weelEvent(QGraphicsSceneWheelEvent *event) |
|
|
|