summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-02-01 17:40:55 +0100
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-02-05 16:22:44 +0100
commit045a6447397c522de2c904e760a08b75fcd0c002 (patch)
treeb5e6a213daaec9cd87fd2de8b61f56adb8e33cbf /examples
parent1efb2693b15f23f269be1db393a83af132924e06 (diff)
downloadqt4-tools-045a6447397c522de2c904e760a08b75fcd0c002.tar.gz
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
Diffstat (limited to 'examples')
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/draganddrop/draggabletext/dragwidget.cpp b/examples/draganddrop/draggabletext/dragwidget.cpp
index 0ada3acf52..1fd40becce 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 {