How QRectF::adjusted() works
My custom graphics item has (0,-60 60x60) boundingRect. When I adjust the coordinates with
rect.adjusted(-5,-5,5,5)
new boundingRect retur开发者_开发百科ns (-5,-65,70x70). I read the documentation here and I think boundingRect should return (-5,-65,65x65)
Do I misunderstand the doc?The trick is in the parameters to the "adjusted".
Initial co-ordinates are (0,-60,60,0) ( since height = 60 & width =60)
when you adjust it with (-5,-5,5,5), the new co-ordinates are (-5,-65,65,5).
So now the width = 70 and the height = 70
精彩评论