Question about tiling images in QGraphicsView

This is related to one of my other questions.

If I split a large image by creating a separate QGraphicsItem (with raster data like its pixmap), how can I track the position of the QGraphicsItem inside the scene? Obviously, for raster data, it is important that all the tiles “touch” to make a continuous image, and they should also be in the right place, so the image does not look messy.

Does each tile have to have positioning methods that move its neighbors on top / left / bottom / right relative to it? It seems awkward. Is there a better way to make them all move together?

In other words, if I pan a scene with scroll bars or select an image and drag / move it around the scene, I want all the tiles to also move and stay in the correct position relative to each other.

What is the best approach for managing the layout, which fragments need to be visualized (i.e. only visible) and fill in the data only after they are needed? In addition, as soon as a fragment was displayed, the data from it was ever discarded and re-populated from the image file, say, if it has not been displayed for some time, and then returns later if someone clicks on this section?

+3
source share
1 answer

There are (more) two ways to do this:

+1

All Articles