简体   繁体   中英

How to drag an item along a fixed path? [in Qt Graphics View]

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM