Do you have antialiasing enabled when drawing those lines?
Antialiasing disabled. With some other sizes the green line does not cover the red square by it's right end, and i could imagine some kind of explanation for this.
But I can't explain _this_ situation.
With Qt 4.7.x there were some problems on the opposite side (+-1 pixel precision), but it was difficult to notice.
It's interesting.. Simple example draws ok. I'll try to prepare the (bad) working example for you. Thanks
I've prepared the project:
qtguierror.zip
Press the buttons to animate
That is awful..
Last edited by Dp0H; 28th February 2012 at 07:34.
I don't have time to test everything right now but from skeeming your code I can say your setRect() implementation is somewhat incorrect (it shouldn't influence the primary problem though).
setPos() should be expressed in the coordinate space of the parent item, so putting it in the same call as setting bounding rect for the item might be confusing for the user.
As for the main problem I'm guessing it all have to do with inability to express every fractional number in the datatype used. Increase your scaling and all should be fine.
Bookmarks