> On Jun 25, 2017, at 4:51 PM, Christian Gagneraud <[email protected]> wrote:
> 
> On 26 June 2017 at 05:10, Patrick Stinson <[email protected]> wrote:
>>    def update(self, *args):
>>        if None in self.people:
>>            return
> 
> you're missing a call to prepareGeometryChange()
> 
>>        a = self.mapToScene(self.people[0].bottomCenterScene())
>>        b = self.mapToScene(self.people[1].bottomCenterScene())
> 
> The path should be in (this) item coordinates, not scene coordinates.

This item will always be top-level so the coordinates will match the scene. But 
for cleanliness’ sake, how do you convert from scene coordinates to item 
coordinates? I don’t see a method for that.

> 
> 
> Plus you're bounding rect should include the pen width of the path
> you're drawing, eg:
> halfPenWidth = self.pen.width()/2.0;
> return self.path.boundingRect().adjusted(-halfPenWidth, -halfPenWidth
> , halfPenWidth , halfPenWidth )
> 
> Hope this helps.
> 
> Chris

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to