Hi,

I would like to implement behaviour like in latest versions of firefox, where a user can drag a tab to the desktop and a new application is started.

I've almost figured out all i need to make it happen except for the "stop sign" that appears under the cursor when dragging stuff to the desktop...

In the code, i have the following mousemove event where the drag is implemented:
Qt Code:
  1. void CMyTabBar::mouseMoveEvent(QMouseEvent *event)
  2. {
  3.  
  4. if (!(event->buttons() & Qt::LeftButton))
  5. {
  6. // Wrong buttn, no drag
  7. return;
  8. }
  9. if ((event->pos() - dragStartPosition).manhattanLength() < QApplication::startDragDistance())
  10. {
  11. // Distance too small, no drag yet !
  12. return;
  13. }
  14.  
  15. if (event->buttons() & Qt::LeftButton )
  16. {
  17. QDrag *drag = new QDrag(this);
  18. QMimeData *mimeData = new QMimeData;
  19. QPixmap* pixmap = new QPixmap(100,100);
  20.  
  21. pixmap->grabWidget( this );
  22.  
  23. drag->setMimeData(mimeData);
  24. drag->setPixmap( *pixmap );
  25.  
  26. Qt::DropAction dropAction = drag->exec(Qt::MoveAction);
  27.  
  28. QWidget* t = drag->target () ;
  29. if( t )
  30. {
  31. // there is a target....
  32. }
  33. else
  34. {
  35. // no target...
  36. QWidget* tmp = new SomeWidget();
  37. tmp->show();
  38.  
  39. }
  40. delete drag;
  41. delete pixmap;
  42. }
  43. }
To copy to clipboard, switch view to plain text mode 

Any ideas on how to override or remove the stop-sign below the cursor ?

Thanks !