I have replaced QTreeWidget with QListWidget in my minimalist example (the thread's first post):

Qt Code:
  1. // main.cpp
  2. #include <QtGui>
  3. #include "MyListWidget.h"
  4.  
  5. int main(int argc, char *argv[]) {
  6. QApplication app(argc, argv);
  7. MyListWidget w;
  8. w.show();
  9. return app.exec();
  10. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. // MyListWidget.h
  2. #ifndef MYLISTWIDGET_H
  3. #define MYLISTWIDGET_H
  4.  
  5. #include <QListWidget>
  6.  
  7. class MyListWidget : public QListWidget
  8. {
  9.  
  10. public:
  11. MyListWidget(QWidget *parent = 0);
  12.  
  13. protected:
  14. void mousePressEvent(QMouseEvent *event);
  15. void mouseMoveEvent(QMouseEvent *event);
  16. // void dragEnterEvent(QDragEnterEvent *event);
  17. // void dragMoveEvent(QDragMoveEvent *event);
  18. // void dropEvent(QDropEvent *event);
  19.  
  20. private:
  21. void performDrag();
  22.  
  23. QPoint startPos;
  24. };
  25.  
  26. #endif
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. // MyListWidget.cpp
  2. #include <QtGui>
  3. #include "MyListWidget.h"
  4.  
  5. MyListWidget::MyListWidget(QWidget *parent) : QListWidget(parent) {
  6. setAcceptDrops(true);
  7.  
  8. addItem("1-one");
  9. addItem("2-two");
  10. addItem("3-three");
  11. addItem("4-four");
  12. addItem("5-five");
  13. addItem("6-six");
  14. addItem("7-seven");
  15. }
  16.  
  17. void MyListWidget::mousePressEvent(QMouseEvent *e) {
  18. if (e->button() == Qt::LeftButton)
  19. startPos = e->pos();
  20. QListWidget::mousePressEvent(e);
  21. }
  22.  
  23. void MyListWidget::mouseMoveEvent(QMouseEvent *e) {
  24. if (e->buttons() & Qt::LeftButton) {
  25. int distance = (e->pos() - startPos).manhattanLength();
  26. if (distance >= QApplication::startDragDistance())
  27. performDrag();
  28. }
  29. QListWidget::mouseMoveEvent(e);
  30. }
  31.  
  32. // void MyListWidget::dragEnterEvent(QDragEnterEvent *e) {
  33. // }
  34. //
  35. // void MyListWidget::dragMoveEvent(QDragMoveEvent *event) {
  36. // }
  37. //
  38. // void MyListWidget::dropEvent(QDropEvent *event) {
  39. // }
  40.  
  41. void MyListWidget::performDrag() {
  42. QListWidgetItem *item = currentItem();
  43. if (item) {
  44. QMimeData *mimeData = new QMimeData;
  45. mimeData->setText(item->text());
  46. QDrag *drag = new QDrag(this);
  47. drag->setMimeData(mimeData);
  48. if (drag->exec(Qt::MoveAction) == Qt::MoveAction)
  49. delete item;
  50. }
  51. }
To copy to clipboard, switch view to plain text mode 

This Drad and Drop example with QListWidget works fine without any dirty-fixes - no lost clicks!

So I incline to the opinion, that QTreeWidget drag and drop issue with the lost click described above is the Qt's bag, not mine.