Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.75 KB | None | 0 0
  1. Hi,
  2.  
  3. The drag of a tab isn't correctly handle in your patch :
  4. You have to call startDragging() directly in mouseMoveEvent() instead
  5. of leaveEvent(). To achieve that, you have to store the position of
  6. the click (in mousePressEvent) in a QPoint.
  7. Then, you compare the difference between the old and the new position
  8. (in mouseMoveEvent). If it's greater than QApplication::dragDistance()
  9. you can start the drag.
  10.  
  11. For more information, you can look the dragging code in the
  12. BookmarkToolBar class. (line 400)
  13.  
  14. After modifying that, every drag is successfully dropped (in the BK
  15. toolbar and the webview). Then for change the tab order inside the
  16. QListWidget, I think you have to reimplement
  17. QListWidget::dropMimeData(...) instead of dropEvent.
  18.  
  19. Regards.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement