Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-127648

DragEvent coordinates are rounded to nearest integer when Item scale is a real value other than 1

    XMLWordPrintable

Details

    Description

      The DragEvent x and y coordinates are declared as real but are incorrectly rounded to the nearest integer when the scale of an Item is set to a real value, e.g. 1.1. For example, a Rectangle with a scale of 1.1 which contains a DropArea, the x and y coordinates of the DragEvent when a drag enters the bounds of the DropArea are rounded to the nearest integer.

      To reproduce the issue, run the attached example project:

      1. The scale of the rectangles is set to 1.1 (can be changed via the slider)
      2. Enter with the cursor on the blue rectangle containing a MouseArea. Observed/Expected behavior: console prints the real value of the mouse coordinates.
      3. Drag the green rectangle onto the red rectangle containing a DropArea. Observed behavior: console prints the DragEvent coordinates as rounded integers. Expected behavior: console prints the real value of the DragEvent coordinates.

      Attachments

        1. qtbug127648_qmake.zip
          2 kB
          Friedemann Kleint
        2. qtbug127648.zip
          2 kB
          Lysandra Sola
        For Gerrit Dashboard: QTBUG-127648
        # Subject Branch Project Status CR V

        Activity

          People

            srutledg Shawn Rutledge
            lysandra.sola Lysandra Sola
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: