Cool, thanks for digging into it a little more.

Thanks for the tip on stroking the path for shape(), though I already do that 
as demonstrated in qgraphicsitemc.cpp - I just removed it from the example code 
I posted here :)

Here is a video of it still not working but with your debug code:

https://www.screencast.com/t/j8JaAcL08O


here is the output of qDebug() << item.pos() << item.boundingRect() << 
item.shape():

PyQt5.QtCore.QPointF() PyQt5.QtCore.QRectF(-213.0724192881762, 
-83.55902694078242, 295.58581163557005, 66.7981150101399) 
<PyQt5.QtGui.QPainterPath object at 0x10f878058>

I have confirmed shape().contains(boundingRect().center()) == false

I wonder if the problem is that my item has no pos()? I am just drawing it in 
relation to the two items that it is connected to. Geeze, if so I wonder how 
that would work when you can drag either of the two items it connects to and it 
just remains in the middle. I guess just listen for their movements and do the 
math to move this item to the center of where it would be drawn…

P.S. gammaray looks amazing.

-P

> On Jun 25, 2017, at 8:17 PM, Christian Gagneraud <[email protected]> wrote:
> 
>  painter.drawPath(boundingRect())

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