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

Animation FPS drops drastically during drag and drop

    XMLWordPrintable

Details

    Description

      Run the below example code on Windows.

      • The red rectangle's animation is fluid
      • Start dragging the gray rectangle.
      • Stop dragging but keep the mouse button pressed -> the animation will start to stutter
      • Continue moving the mouse with button pressed -> the animation is fluid again
      fpsDrop.qml
      import QtQuick 2.4
      
      Item {
          id: container
          width: 1000
          height: 200
      
          Rectangle {
              id: rect
              color: "red"
              width: 100
              height: 100
      
              NumberAnimation on x {
                  from: 0
                  to: container.width - rect.width
                  duration: container.width - rect.width
                  loops: Animation.Infinite
              }
          }
      
          Rectangle {
              id: draggedItem
              height: 100
              width: 100
              y: 100
              color: 'gray'
      
              Drag.active: dragArea.drag.active
              Drag.dragType: Drag.Automatic
              Drag.mimeData: {"text/uri-list": "I am being dragged"}
      
              MouseArea {
                  id: dragArea
                  anchors.fill: parent
                  drag.target: draggedItem
              }
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            juengel Matthias Jüngel
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes