Details
-
Bug
-
Status: Closed
-
Not Evaluated
-
Resolution: Duplicate
-
4.7.1
-
None
-
Bug happens in Windows, Linux and Mac OS X in Qt versions > 4.7.0
Description
QGraphicsView fails selecting with mouse click items when view is transformed (scaled). This bug happens in Qt versions higher than 4.7.0.
Provided example runs perfectly with Qt 4.7.0 and previous ones, but with 4.7.1 and next ones it behaves like selection box was bigger than the one user sees. The example just has a QGraphicsView, creates its scene and then adds a rect item. View is scaled and also has enabled the rubberband hand option (bug it's the same with that option enabled or not). Rubberhand selection box selects items correctly in any Qt version, but as said previously in 4.7.1 and upper mouse click fails.
If we run the example a simple window appears, with a white QGraphicsView and we can see the rect's upper left corner. Try to click near the top or left side of rect and we can see how selection fails (rect gets selected when it should not). Move rect so we can click near bottom and right cornes of rect: selection works correctly. Selection box is extended to top and left, so to speak. If we scale QGraphicsView with (50, -50), flipping Y coordinate, the selection box is extended bottom and left.