本文整理汇总了Python中PyQt4.QtGui.QGraphicsItem.hoverEnterEvent方法的典型用法代码示例。如果您正苦于以下问题:Python QGraphicsItem.hoverEnterEvent方法的具体用法?Python QGraphicsItem.hoverEnterEvent怎么用?Python QGraphicsItem.hoverEnterEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QGraphicsItem
的用法示例。
在下文中一共展示了QGraphicsItem.hoverEnterEvent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: hoverEnterEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import hoverEnterEvent [as 别名]
def hoverEnterEvent (self, e):
self.pen_color = QPen (Qt.red, 2)
self._text_item.setDefaultTextColor (Qt.red)
# records the node_id in the helper's attribute.
self.comm.setHoveredSocketId (self.socket_id)
# deal with the harpoon.
if not self.helper.isTimerEnded():
self.setSelected (True)
self.helper.getGraphView().addLinkAndWirePressBtnListener ()
#self._text_item.setToolTip (self._text_item.toPlainText ())
QGraphicsItem.hoverEnterEvent (self, e)
示例2: hoverEnterEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import hoverEnterEvent [as 别名]
def hoverEnterEvent (self, e):
self._nodename.setToolTip (self._nodename.toPlainText ())
QGraphicsItem.hoverEnterEvent (self, e)
示例3: hoverEnterEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import hoverEnterEvent [as 别名]
def hoverEnterEvent (self, e):
self.wire_pen.setColor (Qt.red)
QGraphicsItem.hoverEnterEvent (self, e)
示例4: hoverEnterEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import hoverEnterEvent [as 别名]
def hoverEnterEvent(self, event):
self.graphicsEffect().setEnabled(True)
self.setOpacity(1.0)
QGraphicsItem.hoverEnterEvent(self, event)
示例5: hoverEnterEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import hoverEnterEvent [as 别名]
def hoverEnterEvent (self, e):
# records the node_id in the helper's attribute.
self.comm.setHoveredItemId (self.node_id)
QGraphicsItem.hoverEnterEvent (self, e)
示例6: hoverEnterEvent
# 需要导入模块: from PyQt4.QtGui import QGraphicsItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsItem import hoverEnterEvent [as 别名]
def hoverEnterEvent(self, event):
if self.controller().isSelectToolActive():
self.setCursor(Qt.OpenHandCursor)
QGraphicsItem.hoverEnterEvent(self, event)