我试图在pyqt中构建一个简单的节点图。我有一些问题与一个自定义小部件离开工件,并没有正确绘制时,鼠标移动。见下图:
在我用鼠标移动节点之前。在
在我用鼠标移动模式之后
我想可能是我的自定义小部件nodefx上的绑定方法:
def boundingRect(self):
"""Bounding."""
return QtCore.QRectF(self.pos().x(),
self.pos().y(),
self.width,
self.height)
有什么想法吗?完成下面的py文件。在
^{pr2}$
Tags:
所以我的问题是我没有缩放“对象空间”中的边界框。。。以下更改可以修复我的问题。在
^{pr2}$
相关问题 更多 >
编程相关推荐