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. Bug in Qt 5.12 drag n'drop ?

Bug in Qt 5.12 drag n'drop ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qat 5.12 drag ndrop
57 Posts 12 Posters 15.4k 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.
  • S SGaist
    14 Dec 2018, 22:36

    "not that different" can be a big can of worm ;)

    C Offline
    C Offline
    cawlfj
    wrote on 31 Dec 2018, 01:41 last edited by
    #46

    @SGaist
    i found same bug also in my app. change back 5.11 drop come back.
    windows10 qt5.12.0 QLinedit , can drag from QLineEdit , but can't drop to QLineEdit.
    Sometimes press the "ctrl" can drop to QLineEdit.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      ModelTech
      wrote on 31 Dec 2018, 09:05 last edited by
      #47

      I have checked the drag & drop in my app when running on Ubuntu 16.04. The drag is from a QListWidgetItem to a drop on a QGraphicsView. I appropriately overrode QGraphicsView::dropEvent (and all the drag methods of QGraphicsView). It still works in Qt5.12.0 although the willingness to accept the QMimeData constructed from the QListWidgetItem as a droppable on the QGraphicsView (visible as a change in the mouse pointer icon) seems to be less than it was with Qt5.7 that I used up to yesterday. No clue whether this is in any way related, but perhaps it brings some ideas of what causes the issue for dropping on a QLineEdit.

      1 Reply Last reply
      1
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 31 Dec 2018, 22:37 last edited by
        #48

        @ModelTech can you provide a minimal compilable example that shows that change of behaviour ?

        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
        • R Offline
          R Offline
          ReDEnergy
          wrote on 2 Jan 2019, 17:56 last edited by ReDEnergy 1 Feb 2019, 17:57
          #49

          Hi. I had the same problem. Everything worked fine on Qt 5.7 then after I updated to Qt 5.12 dropping would not work at all.
          At least in my case it seems that for previous version of Qt only implementing dragEnterEvent was enough but with 5.12 I had to also override the dragMoveEvent event.
          So, basically I have this 2 things and now it works as expected. Hope it helps someone.

          void QtDropArea::dragEnterEvent(QDragEnterEvent *event)
          {
          	event->acceptProposedAction();
          }
          
          // this was added after updating to Qt 5.12
          void QtDropArea::dragMoveEvent(QDragMoveEvent *event)
          {
          	event->acceptProposedAction();
          }
          
          1 Reply Last reply
          3
          • C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 2 Jan 2019, 18:41 last edited by
            #50

            @ReDEnergy said in Bug in Qt 5.12 drag n'drop ?:

            QtDropArea

            From what did you derive QtDropArea?

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • R Offline
              R Offline
              ReDEnergy
              wrote on 2 Jan 2019, 18:44 last edited by ReDEnergy 1 Feb 2019, 18:45
              #51

              from the classic QWidget

              1 Reply Last reply
              0
              • C Offline
                C Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 2 Jan 2019, 18:56 last edited by
                #52

                Thx for your hint with the dragMoveEvent() reimpl. I think I can reproduce your issue and also found the corresponding commit.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                2
                • C Offline
                  C Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on 2 Jan 2019, 20:42 last edited by aha_1980 1 Mar 2019, 06:21
                  #53

                  Can you please check if you get a dragEnterEvent in the problematic case? I would guess no.
                  The problem was introduced with f8944a7f07112c85dc4f66848cabb490514cd28e which is a bugfix for QTBUG-67155.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  A 1 Reply Last reply 3 Jan 2019, 06:23
                  2
                  • R Offline
                    R Offline
                    ReDEnergy
                    wrote on 3 Jan 2019, 00:04 last edited by
                    #54

                    Great to hear that. So, I suppose what I did is a workaround for the moment, but at least it works.

                    1 Reply Last reply
                    0
                    • C Christian Ehrlicher
                      2 Jan 2019, 20:42

                      Can you please check if you get a dragEnterEvent in the problematic case? I would guess no.
                      The problem was introduced with f8944a7f07112c85dc4f66848cabb490514cd28e which is a bugfix for QTBUG-67155.

                      A Offline
                      A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on 3 Jan 2019, 06:23 last edited by
                      #55

                      @Christian-Ehrlicher I already did some cross-links, can you create a bugreport for that issue?

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        Christian Ehrlicher
                        Lifetime Qt Champion
                        wrote on 3 Jan 2019, 19:25 last edited by Christian Ehrlicher 1 Mar 2019, 19:41
                        #56

                        https://bugreports.qt.io/browse/QTBUG-72844 and https://codereview.qt-project.org/249086

                        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                        Visit the Qt Academy at https://academy.qt.io/catalog

                        1 Reply Last reply
                        3
                        • C Offline
                          C Offline
                          Christian Ehrlicher
                          Lifetime Qt Champion
                          wrote on 7 Jan 2019, 13:01 last edited by
                          #57

                          The bug will be fixed in 5.12.1

                          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                          Visit the Qt Academy at https://academy.qt.io/catalog

                          1 Reply Last reply
                          1

                          55/57

                          3 Jan 2019, 06:23

                          • Login

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