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. QTableView drag drop support with row selection only
QtWS25 Last Chance

QTableView drag drop support with row selection only

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 2.0k Views
  • 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.
  • J Offline
    J Offline
    jpalbertini
    wrote on last edited by
    #1

    Hi everyone
    I have a strange behavior with the table view... I allow row multiple selection and I try to use Drag & Drop to move items.
    Everything works fine most of the time :) But sometime, when I try to do a drag drop by moving my mouse horizontally (accidentally) it block the drag drop operation and display an Ignore Action on windows... Is it an expected behavior ?

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

      Hi,

      Do you mean that you are dragging over the row you just start dragging from ?

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

      J 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Do you mean that you are dragging over the row you just start dragging from ?

        J Offline
        J Offline
        jpalbertini
        wrote on last edited by
        #3

        @SGaist :
        Not specifically, as long as I start the drag drop by moving my mouse horizontally, I got an ignore action...

        Just dug a little deeper into Qt code, it's the COM call DoDragDrop that gave me the ignore action.
        I just solved the problem, I was using setDragDropMode(QAbstractItemView::InternalMove);. If I change to setDragDropMode(QAbstractItemView::DragDrop); I got a fully fonctionnal drag drop operation on rows, I don't know why though...

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

          Sounds a bit strange indeed… Running on Windows ?

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

          J 1 Reply Last reply
          0
          • SGaistS SGaist

            Sounds a bit strange indeed… Running on Windows ?

            J Offline
            J Offline
            jpalbertini
            wrote on last edited by
            #5

            @SGaist
            Yes, just tried, don't have the problem on OSX...

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

              Might be a glitch on the windows low level stuff handling

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

              J 1 Reply Last reply
              0
              • SGaistS SGaist

                Might be a glitch on the windows low level stuff handling

                J Offline
                J Offline
                jpalbertini
                wrote on last edited by
                #7

                @SGaist
                Ok thanks, i'll report it

                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