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

Canvas is repainted when moved

    XMLWordPrintable

Details

    • 97daddee7a3abde2aea7327422d9102129eb09e7

    Description

      import QtQuick 2.0
      
      Rectangle {
          id: root
          width: 400
          height: 400
      
          Canvas {
              id: canvas
              width: 30
              height: 30
      
              onPaint: {
                  print("painted");
      
                  var ctx = getContext("2d");
                  ctx.beginPath();
                  ctx.fillStyle = "red";
                  ctx.ellipse(0, 0, width, height);
                  ctx.fill();
              }
          }
      
          Timer {
              running: true
              repeat: true
              interval: 100
              onTriggered: canvas.x += 0.1
          }
      }
      

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes