Hello, everybody.
I try to make a view for a long-time signal. For this task i use two components: Canvas for plot and Flickable for navigation. At this way i create a large virtual canvas, canvas window and tiles with this way:
Canvas {
anchors.fill: parent
canvasSize: Qt.size(wave.width, height);
canvasWindow: Qt.rect(flickable.contentX, 0, width, height);
tileSize: Qt.size(width*2, height)
onPaint: {
/* painting */
}
}
So, at start on canvas there is correct part of the signal drawn at range from 0 to max(canvasWindow.width, tileSize.width), but if i move outside this range there will be trash from memory. But i expect the continuation of the signal. If i move canvasWindow.x to max(canvasWindow.width, tileSize.width) than all virtual canvas will be looks like trash from memory.
I’d like just navigate over the signal without redraw. I can’t draw all signal at start because of size of the signal: it throws memory overflow error. This solution I found at article Tiled Canvas [qt-project.org] from documentation for Canvas.
What do i do wrong?
OS: Kubuntu 14.10 and Win7
↧