summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-02-01 16:40:55 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-02-05 15:22:44 (GMT)
commit045a6447397c522de2c904e760a08b75fcd0c002 (patch)
treeb5e6a213daaec9cd87fd2de8b61f56adb8e33cbf /examples
parent1efb2693b15f23f269be1db393a83af132924e06 (diff)
downloadQt-045a6447397c522de2c904e760a08b75fcd0c002.zip
Qt-045a6447397c522de2c904e760a08b75fcd0c002.tar.gz
Qt-045a6447397c522de2c904e760a08b75fcd0c002.tar.bz2
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 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 {