QDrag issues



  • Hi,

    I am having two issues when using QDrag.

    First is with QTreeWidget: I select QTreeWidget items and when focus is out and then in again, if I drag the selected items it goes into selection change not on startDrag (). The condition on eventFilter () (((QMouseEvent*)event)->pos () - m_dragStartPos).manhattanLength () < QApplication::startDragDistance () is not fulfilled. What is going wrong with this condition?

    Does anyone has idea about the same ?

    Second issue is QDrag setpixmap does not work from remote desktop, I am setting the pixmap on start drag, it is visible on local desktop but from remote desktop it does not work.

    Does anyone has idea about the above issues?

    Mahima


  • Lifetime Qt Champion

    Hi,

    Did you implement the drag and drop yourself for QTreeWidget ?

    Also, you should add which version of Qt and what OS you are using



  • Hi,

    Thanks for your response. I am using Qt 5.2 but I have solved the issue. I removed the condition (((QMouseEvent*)event)->pos () – m_dragStartPos).manhattanLength () < QApplication::startDragDistance () as the value of manhattanLength changes when the focus is in after focus out.

    And regarding second issue:
    when I used setHotspot (0, 0), it started showing me drag icon from remote desktop. I dont know how did this work?

    Mahima


  • Lifetime Qt Champion

    Which Qt version and OS are you using ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.