It should be about the average size of items in the QCanvas. Chunks too small increase the amount of calculation required when drawing. Chunks too large increase the amount of drawing that is needed. If the QCanvas has a large number of small, dispersed items, this should be about that number. The more clusters the slower the redraw, but also the bigger clusters are the slower the redraw, so a balance is needed.
Testing indicates that a large number of clusters is almost always best.
The default is to use double-buffering. Turning off double-buffering casuses the redrawn areas to flicker a bit. The pixmap p contains the tiles arranged left to right, top to bottom, with tile 0 in the top-left corner, tile 1 to the right of tile 0, and so on. If the QCanvas is larger than the matrix of tiles, the entire matrix is repeated as necessary to cover the area. If it is smaller, tiles to the right and bottom are not visible.