Change the boundingRect() implementation. It is the one deciding about coordinates.
Change the boundingRect() implementation. It is the one deciding about coordinates.
can i have an example?????
Sorry, an example of what? Returning of a QRect object?
if the code is :
Qt Code:
return rect(); }To copy to clipboard, switch view to plain text mode
....so i don't resolve the problem.
The item coordinate (0,0) doesn't match with the centre of the item.
The rect you return has to correspond to the coordinates. If you increase the size of the rectangle and want the (0,0) point to remain in the middle of the rectangle, the upper left corner has to change its coordinates. Otherwise you're just extending the rectangle one way.
Bookmarks