本文整理汇总了Python中PyQt4.QtGui.QGraphicsItem.mouseReleaseEvent方法的典型用法代码示例。如果您正苦于以下问题:Python QGraphicsItem.mouseReleaseEvent方法的具体用法?Python QGraphicsItem.mouseReleaseEvent怎么用?Python QGraphicsItem.mouseReleaseEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QGraphicsItem
的用法示例。
在下文中一共展示了QGraphicsItem.mouseReleaseEvent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mouseReleaseEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import mouseReleaseEvent [as 别名]
def mouseReleaseEvent (self, e):
self.harpoon.setVisible (False)
self.helper.initAndStartTimer ()
QGraphicsItem.mouseReleaseEvent (self, e)
示例2: mouseReleaseEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import mouseReleaseEvent [as 别名]
def mouseReleaseEvent(self, event):
if self.dragging_line:
log_debug("Adding point to cell")
self.setGeometry()
drag_side = (self.drag_side+1) % (len(self.polygon)-1)
self.scene().addPointToCell(self.cell_id, drag_side, self.mapToScene(event.pos()))
else:
event.ignore()
QGraphicsItem.mouseReleaseEvent(self, event)
self.drag_line = False
self.dragging_line = False
示例3: mouseReleaseEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import mouseReleaseEvent [as 别名]
def mouseReleaseEvent(self, event):
QGraphicsItem.mouseReleaseEvent(self, event)
self.being_moved = False
self.setZValue(0)
示例4: mouseReleaseEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import mouseReleaseEvent [as 别名]
def mouseReleaseEvent (self, e):
QGraphicsItem.mouseReleaseEvent (self, e)