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 ?
QtWS25 Last Chance

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 skylendar
    14 Dec 2018, 20:45

    @SGaist

    Ok, I'm using Qt 5.12.0 Linux x86_64 downloaded directly from qt.io.
    Apparently, this bug (behavior ?) doesn't seem to be listed in the bugs db.
    I patched both QWidget::dragEnterEvent() and QWidget::dropEnterEvent() for a specific widget. It has been working for at least 10 years, but with 5.12.0 dragEnterEvent() is executed, and not dropEnterEvent().

    In my code, I used event->acceptProposedAction() instead of event->setAccepted(true), but it worked fine.

    S Offline
    S Offline
    skylendar
    wrote on 14 Dec 2018, 21:19 last edited by
    #4

    @skylendar

    I also tried the dnd robot example which uses event->setAccepted(true) in its dragEnterEvent(). It works but when I do the same in my code, zip...

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 14 Dec 2018, 22:18 last edited by
      #5

      Can you spot any difference between the example and what you do in your application ?

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

      S 1 Reply Last reply 14 Dec 2018, 22:35
      0
      • S SGaist
        14 Dec 2018, 22:18

        Can you spot any difference between the example and what you do in your application ?

        S Offline
        S Offline
        skylendar
        wrote on 14 Dec 2018, 22:35 last edited by
        #6

        @SGaist

        Yes, "robot" works but not my app, which is not that different, at least about dnd

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 14 Dec 2018, 22:36 last edited by
          #7

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

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

          S C 2 Replies Last reply 14 Dec 2018, 22:39
          1
          • S SGaist
            14 Dec 2018, 22:36

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

            S Offline
            S Offline
            skylendar
            wrote on 14 Dec 2018, 22:39 last edited by
            #8

            @SGaist

            wait, i'm testing again..

            S 1 Reply Last reply 14 Dec 2018, 22:42
            0
            • S skylendar
              14 Dec 2018, 22:39

              @SGaist

              wait, i'm testing again..

              S Offline
              S Offline
              skylendar
              wrote on 14 Dec 2018, 22:42 last edited by skylendar
              #9

              @skylendar

              Ah, "robot" is based on a QGraphicsObject, which receives QGraphicsSceneDragDropEvent , whereas my app is based on a mere QWidget, which receives a QDragEnterEvent

              S 1 Reply Last reply 14 Dec 2018, 22:44
              0
              • S skylendar
                14 Dec 2018, 22:42

                @skylendar

                Ah, "robot" is based on a QGraphicsObject, which receives QGraphicsSceneDragDropEvent , whereas my app is based on a mere QWidget, which receives a QDragEnterEvent

                S Offline
                S Offline
                skylendar
                wrote on 14 Dec 2018, 22:44 last edited by
                #10

                @skylendar

                And remember, my code works fine with qt5.11.x, and not with qt5.12.0

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on 15 Dec 2018, 08:47 last edited by
                  #11

                  Please provide a example - otherwise I don't see how we can spot the problem...

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

                  S 1 Reply Last reply 15 Dec 2018, 16:06
                  1
                  • C Christian Ehrlicher
                    15 Dec 2018, 08:47

                    Please provide a example - otherwise I don't see how we can spot the problem...

                    S Offline
                    S Offline
                    skylendar
                    wrote on 15 Dec 2018, 16:06 last edited by
                    #12

                    @Christian-Ehrlicher

                    Ok, in that case, get my open source app:
                    https://sourceforge.net/projects/skylendar/
                    and compile it with qt5.12.0
                    When compiled and running, drag the "Now" Dataset (on the left column) onto the window named "Standard wheel".

                    Then, the pointer becomes a barred red circle, instead of a black hand for dropping, i.e. dropping is impossible.

                    When compiled with 5.11 apparently nothing happens because the standard wheel already uses "Now", but it works...

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on 15 Dec 2018, 16:28 last edited by
                      #13

                      I tried to run your app but I won't let something run as root on my system. Please provide a minimal, compilable example to reproduce the issue.

                      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 15 Dec 2018, 16:30
                      1
                      • C Christian Ehrlicher
                        15 Dec 2018, 16:28

                        I tried to run your app but I won't let something run as root on my system. Please provide a minimal, compilable example to reproduce the issue.

                        A Offline
                        A Offline
                        aha_1980
                        Lifetime Qt Champion
                        wrote on 15 Dec 2018, 16:30 last edited by
                        #14

                        @Christian-Ehrlicher

                        I tried to run your app but I won't let something run as root on my system.

                        probably the elevated rights are part of the problem?

                        Qt has to stay free or it will die.

                        C S 3 Replies Last reply 15 Dec 2018, 16:40
                        0
                        • A aha_1980
                          15 Dec 2018, 16:30

                          @Christian-Ehrlicher

                          I tried to run your app but I won't let something run as root on my system.

                          probably the elevated rights are part of the problem?

                          C Offline
                          C Offline
                          Christian Ehrlicher
                          Lifetime Qt Champion
                          wrote on 15 Dec 2018, 16:40 last edited by
                          #15

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

                          probably the elevated rights are part of the problem?

                          Don't think so - it's using a database and the app which creates the schema etc. wants admin rights. After this it looks like the normal application can run without admin rights but did not came that far.

                          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
                          • A aha_1980
                            15 Dec 2018, 16:30

                            @Christian-Ehrlicher

                            I tried to run your app but I won't let something run as root on my system.

                            probably the elevated rights are part of the problem?

                            S Offline
                            S Offline
                            skylendar
                            wrote on 15 Dec 2018, 16:44 last edited by
                            #16

                            @aha_1980

                            No, only skydmin needs admin right in order to install the db. skylendar runs as a normal user.

                            1 Reply Last reply
                            0
                            • A aha_1980
                              15 Dec 2018, 16:30

                              @Christian-Ehrlicher

                              I tried to run your app but I won't let something run as root on my system.

                              probably the elevated rights are part of the problem?

                              S Offline
                              S Offline
                              skylendar
                              wrote on 15 Dec 2018, 16:46 last edited by
                              #17

                              @aha_1980

                              If you really are scared to run skydmin as root, I can tell you how to install the db as the postgres non-root user.

                              A 1 Reply Last reply 15 Dec 2018, 16:54
                              0
                              • S skylendar
                                15 Dec 2018, 16:46

                                @aha_1980

                                If you really are scared to run skydmin as root, I can tell you how to install the db as the postgres non-root user.

                                A Offline
                                A Offline
                                aha_1980
                                Lifetime Qt Champion
                                wrote on 15 Dec 2018, 16:54 last edited by
                                #18

                                @skylendar Thanks, but I don't think I'll debug your program ;)

                                I have too much of my own problems

                                Qt has to stay free or it will die.

                                S 2 Replies Last reply 15 Dec 2018, 17:00
                                0
                                • A aha_1980
                                  15 Dec 2018, 16:54

                                  @skylendar Thanks, but I don't think I'll debug your program ;)

                                  I have too much of my own problems

                                  S Offline
                                  S Offline
                                  skylendar
                                  wrote on 15 Dec 2018, 17:00 last edited by
                                  #19

                                  @aha_1980

                                  I don't ask you to debug my app, just run it.

                                  1 Reply Last reply
                                  0
                                  • A aha_1980
                                    15 Dec 2018, 16:54

                                    @skylendar Thanks, but I don't think I'll debug your program ;)

                                    I have too much of my own problems

                                    S Offline
                                    S Offline
                                    skylendar
                                    wrote on 15 Dec 2018, 17:05 last edited by
                                    #20

                                    @aha_1980

                                    In addition, I don't want anything. I just signal a possible bug. That's all.

                                    A 1 Reply Last reply 15 Dec 2018, 17:28
                                    0
                                    • S skylendar
                                      15 Dec 2018, 17:05

                                      @aha_1980

                                      In addition, I don't want anything. I just signal a possible bug. That's all.

                                      A Offline
                                      A Offline
                                      aha_1980
                                      Lifetime Qt Champion
                                      wrote on 15 Dec 2018, 17:28 last edited by aha_1980
                                      #21

                                      @skylendar thats why we need a simple program, trimmed down to the actual problem.

                                      Otherwise its hard to track down where the bug is. Until now it is not even proven that Qt is guilty.

                                      Qt has to stay free or it will die.

                                      S 2 Replies Last reply 15 Dec 2018, 17:50
                                      1
                                      • A aha_1980
                                        15 Dec 2018, 17:28

                                        @skylendar thats why we need a simple program, trimmed down to the actual problem.

                                        Otherwise its hard to track down where the bug is. Until now it is not even proven that Qt is guilty.

                                        S Offline
                                        S Offline
                                        skylendar
                                        wrote on 15 Dec 2018, 17:50 last edited by
                                        #22

                                        @aha_1980

                                        This is not a matter of guilt or not. We are not in an american thriller.
                                        And besides, how do you explain that my app works fine with qt5.11 and below, but not with qt5.12 ?

                                        1 Reply Last reply
                                        0
                                        • A aha_1980
                                          15 Dec 2018, 17:28

                                          @skylendar thats why we need a simple program, trimmed down to the actual problem.

                                          Otherwise its hard to track down where the bug is. Until now it is not even proven that Qt is guilty.

                                          S Offline
                                          S Offline
                                          skylendar
                                          wrote on 15 Dec 2018, 18:02 last edited by
                                          #23

                                          @aha_1980

                                          And you forget something: Qt is actually a commercial program, and most of you, if not all, are paid for debugging it. Why should I work for you for free ?

                                          mrjjM J.HilkJ 2 Replies Last reply 15 Dec 2018, 18:22
                                          -2

                                          13/57

                                          15 Dec 2018, 16:28

                                          44 unread
                                          • Login

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