On 19 Jan 2014, at 16:34, Dmitrii Volosnykh <[email protected]> wrote:
> Probably we may discuss it before make any unwanted bug reports...
> Basically, I have the same problems described in the referenced topic from 
> URL. Specifically, I have a scene (tiles of geographic map) and an overlay 
> consisting of a polyline which should be editable via dragging its vertices.
> By default, map is translated when mouse is moved with left button being 
> pressed. It should not do so when some of the polyline's vertices is being 
> dragged. This is where the problem comes up. As for now, while draging vertex 
> the map is translated at the same time. Of course, this looks weird. So, I'd 
> like to have some means to distinguish the case when QGraphicsScene processes 
> (or one of its QGraphicsItem's) mouse move event and when it is not. I could 
> rely on QEvent::isAccepted() flag, but it is true everytime.
> As for your statement that current behaviour is correct: what do you think 
> about changes done as a result of resolving QTBUG-8061 
> (https://bugreports.qt-project.org/brows/QTBUG-8061)? See 
> https://codereview.qt-project.org/#patch,sidebyside,61740,2,src/widgets/graphicsview/qgraphicsview.cpp
> This patch is right what I lack for mouseMoveEventHandler() to do for me, in 
> case this is consistent with desired behaviour.

Sounds to me like you want the behaviour to change based on what you press. 
QWidget’s mouse event propagation policy is different from graphics view’s. In 
graphics view, if the press is rejected, the move is never delivered, 
regardless. If an item on the scene does get a move, that’s because the item 
accepted the press. So, the move is always accepted.

The bug above is about press / double-click - so it’s not related.

If you want to discuss the behaviour further, I think it’s best to create a new 
bug report, which includes the code in question.

Andreas
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to