PDA

View Full Version : ItemAt and ScenePos



jano_alex_es
23rd October 2009, 12:03
Hi,

I have an item at scenePos x,y. But QGraphicsScene::itemAt(x, y) returns 0.

I think this should be impossible... but it happens :S

The item is a QGraphicsRectItem, maybe the border is too thin?

thanks!

wysota
23rd October 2009, 12:32
Please provide a minimal compilable example reproducing the problem.

zgulser
23rd October 2009, 14:42
Hi,

I suggest you to check the x,y values in the itemAt function.

jano_alex_es
26th October 2009, 14:48
I was checking them :p that's why I was sure it wasn't able to find the item where it should do.

Anyway, it's solved. I wasn't doing "prepareGeometryChange", I was subclassing events I shouldn't subclass and where I shouldn't do it... and now it works fine :)

thanks!