How would you make an object like the red one in this picture be dragged along the white line so that it rotates as the line curves and stays fixed on the line?
Using GraphicsItems in Qt.
As Daniel Sanchesz said:
get the circle radius, ofsset you box, rotate over the circle center, learn some math