I am trying to put two photos in a QGraphicsScene . One is fixed and the other is movable. But I can only put these photos in QGraphicsScene , I can not move them. How can I achieve this?
QGraphicsScene
You must make sure that the element is movable. Take a look at QGraphicsItem :: setFlag .
You will need to do something like this:
myImageItem->setFlag(QGraphicsItem::ItemIsMovable, true);
Source: https://habr.com/ru/post/1313083/More articles:Overload Resolution and Advanced Options in C # 4 - c #JQuery behaves strangely with different IE8 security settings - javascriptLaunch Excel with C # and close it on Save - c #Changing annotation attribute value at runtime in java - javaWill it be garbage collection in the JVM? - javaWhich _proper_ html element is used to trigger an action when the image is clicked? - htmlDisplay last opened positions in menu bar - javaHow to get each index of a virtual function, how does the compiler do it? - c ++Is it possible to override the Hibernate operator "like" in HQL? - hibernateDifferentiation between native and reference objects in code? - designAll Articles