Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Solved QTableView drag drop support with row selection only

    General and Desktop
    2
    7
    1561
    Loading More Posts
    • 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
      jpalbertini last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • J
          jpalbertini @SGaist last edited by

          @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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • J
              jpalbertini @SGaist last edited by

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

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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 Reply Quote 0
                • J
                  jpalbertini @SGaist last edited by

                  @SGaist
                  Ok thanks, i'll report it

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post