From 045a6447397c522de2c904e760a08b75fcd0c002 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 1 Feb 2010 17:40:55 +0100 Subject: Fixed draggabletext example. The example expects that you can only move items around inside the same application. However when dragging items to another application it is allowed to either move or copy items. Mouse cursors during the DND should respect that. Reviewed-by: Bradley T. Hughes --- examples/draganddrop/draggabletext/dragwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/draganddrop/draggabletext/dragwidget.cpp b/examples/draganddrop/draggabletext/dragwidget.cpp index 0ada3ac..1fd40be 100644 --- a/examples/draganddrop/draggabletext/dragwidget.cpp +++ b/examples/draganddrop/draggabletext/dragwidget.cpp @@ -82,7 +82,7 @@ DragWidget::DragWidget(QWidget *parent) void DragWidget::dragEnterEvent(QDragEnterEvent *event) { if (event->mimeData()->hasText()) { - if (children().contains(event->source())) { + if (event->source() == this) { event->setDropAction(Qt::MoveAction); event->accept(); } else { -- cgit v0.12