문제

I'm trying to put two pictures in the QGraphicsScene. One is fixed and the other one is movable. But I succeed only in putting those pictures in the QGraphicsScene, I can't move them. How can I achieve this?

도움이 되었습니까?

해결책

You have to make sure the item is movable. Have a look at QGraphicsItem::setFlag.

You'll have to do something like this :

myImageItem->setFlag(QGraphicsItem::ItemIsMovable, true);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top