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

QGraphicsItem DeviceCoordinateCache glitches

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.7.1, 5.8.0, 5.9.0
    • Widgets: GraphicsView
    • None
    • Fedora 25, x86_64
      (both on X11 with xcb backend and on Wayland with wayland-egl backend)

    Description

      If the cache mode of a custom QGraphicsItem is set to DeviceCoordinateCache, and the item is moved (by setPos(x, y)) in the scene so that some part of it is brought into view, while it's simultaneously changing its boundingRect(), most of the time only the newly visible region gets redrawn.
      See the attached code and linked video. (The horizontal movement of the rectangles is due to setPos calls from the outside, and the vertical movement is an internal animation driven by setTime().)

      The glitching only occurs if I call update() without a parameter, and not if I call update(boundingRect()) - which I thought should have the exact same effect.

      This effect is also size dependent, in the attached example project a width of 800 is still fine, but 1000 is not.
      I found a threshold somewhere around 840 and 850 units, but it could depend on the height as well, I haven't tested that.

      This is what I see running the sample: https://youtu.be/gjZdcHKUsuw
      (ignore the stuttering in the first few seconds, it's a recording artifact)

      Am I doing something wrong?

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            torokati44 Attila
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes