Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDrag issues

QDrag issues

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mahima
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mahima
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Which Qt version and OS are you using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved