I have a problem in Here is the code I use: So when I run my program, I have this window, and I can drag the item. Everything looks fine But if I look closer than the dragging zone item It is big (see blue rectangle on lower screenshot). The blue rectangle means that if I move the mouse to this rectangle, the cursor changes, and I can drag the item. I'm guessing this problem is a " Fit Inview "(view () -> is related to the viewfinder ()); A ???? Line. If I remove it, then it works if I add a scale (5,1) For example, there is only one problem. Do you know what the problem might be? I think you kill this bug: what happens Qi uses a visible rectangle that is in 1x1 size, to test if the items are under the cursor. In your (and my) case, 1 unit in the scene is more than 1 pixel on the screen, so 1x1 covers more than 1 pixel from the rectangular cursor, and touches the items that are not below the cursor. I submitted a fix / merge request. You can modify your QT source to work for it now. QGrahicsRectItem in
QGraphicsScene . What do I want to be able to move the item with the mouse? But the problem is that in my case, the dragging rectangle is bigger than the item.
Comments
Post a Comment