Sorry about the general-purpose title, was not sure how to exactly sum this up in a simple one-liner

I am using QGraphicsView to display some pixmaps of data. Overlayed on top of these pixmaps are item data. Not sure if this matters, but there could be many. many of these items to display. This data can come from an outside source or from a user manually creating the item. The data will contain x,y positioning and width,height size information about the item to be displayed . . . so, a rectangular box. Internally the rect will be defined as -w/2.,0 w,h. Associated with this box will be another item, an icon, so to speak. I am ignoring transforms on the icon so I can draw the icon with a user defined size.

The problem that I am having is that I want the icon to appear above the upper left corner or the box, if the box is visible . . . and the box is visible unless the user zooms far enough out that that the box is too small (level of detail < X). If the box is not visible, I want the icon to move to the top-centered location . . . which should be the original x,y position.

extract.png

Currently I am using a item group to hold the rect item and the shape (icon) item. I cannot find a way to trigger the move (setPos) of the icon based on the level of detail determined inside the paint method of the rect item.

I was hoping that someone could point me in some direction to resolve this.
Anything would be appreciated