I have a QGraphicsView with a QGraphicsScene. That QGraphicsScene contains a QPixmap. It is possible to drag the scene. On top of that scene I have a HUD with QLabels, QPushButtons and other stuff. When I drag the scene around, the HUD elements never change their position. So far it works all perfect. But now I need to add a new element to this HUD, an ellipse/circle. But all the stuff I tried, isn't working properly. The problem, if you are over that circle, with the mouse, it must be still possible to grab and drag the scene. So I need only a visible circle, that is completely ignored by the mou开发者_运维知识库se or any other action. How can I do that?
If setting the circle widget to disabled using setEnabled(false)
doesn't give you the desired effect, try calling setAttribute(Qt::WA_TransparentForMouseEvents, true)
on it.
精彩评论