Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.0.1
-
Ubuntu 13.04.
$ qmake --version
QMake version 3.0
Using Qt version 5.0.1 in /usr/lib/x86_64-linux-gnu
Description
I'm getting strange bugs when rendering to Canvas in Qt 5.0.1. Given this QML file:
import QtQuick 2.0
Rectangle {
width: 500
height: 500
Flow {
id: flow
Component.onCompleted: {
// Create a bunch of canvases dynamically and put them in the Flow
"1/2/3/4".split("/").forEach(function() {
function finishCreation()
console.log("creating canvas");
var canvas = Qt.createQmlObject("import QtQuick 2.0; Canvas
", flow, "canvas"+Math.random());
canvas.onAvailableChanged.connect(function()
);
});
}
}
}
(obviously this is a simplified example of what I'm actually trying to do; the above example doesn't need to dynamically create the canvases, but the actual thing I'm doing does, and it needs Threaded rendering to be able to use Canvas.toDataURL)
I should get 4 red squares. Instead, I get one red square, and which of the four squares renders changes from run to run. (See attached screenshot.) Feedback on Google+ suggests that some other people are getting four red squares as expected, so I think that this is a bug rather than pilot error.