Details
-
Bug
-
Resolution: Won't Do
-
P4: Low
-
None
-
5.1.0 , 6.4.0
-
Mac OS X 10.8.4
Description
This bug appears different depending on the Qt versions.
5.1.0:
At first all tiles are broken. After scrolling all tiles are correct.
stable-branch:
At first all tiles are correct. After scrolling the program crashes.
dev-branch:
At first all tiles are correct. After scrolling some tiles are broken like the attached image.
All of them are tested on OS X.
import QtQuick 2.0 Rectangle { width: 400 height: 400 Flickable { id: flick anchors.fill: parent contentWidth: 400 contentHeight: 40000 } Canvas { parent: flick anchors.fill: parent contextType: "2d" canvasSize: Qt.size(flick.contentWidth, flick.contentHeight) canvasWindow: Qt.rect(flick.contentX, flick.contentY, flick.width, flick.height) tileSize: Qt.size(20, 20) renderStrategy: Canvas.Cooperative onPaint: { for (var y = region.y; y < region.y + region.height; y += tileSize.height) { for (var x = region.x; x < region.x + region.width; x += tileSize.width) { context.fillStyle = "black"; context.fillRect(x, y, tileSize.width, tileSize.height); context.fillStyle = "green"; context.fillRect(x + 1, y + 1, tileSize.width - 2, tileSize.height - 2); } } } onCanvasWindowChanged: requestPaint() } }