本文整理汇总了Python中PyQt4.QtCore.QEvent.data方法的典型用法代码示例。如果您正苦于以下问题:Python QEvent.data方法的具体用法?Python QEvent.data怎么用?Python QEvent.data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtCore.QEvent
的用法示例。
在下文中一共展示了QEvent.data方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: timerEvent
# 需要导入模块: from PyQt4.QtCore import QEvent [as 别名]
# 或者: from PyQt4.QtCore.QEvent import data [as 别名]
def timerEvent(self, e):
if self.percent == 100:
self.killTimer(self.tid)
event = QEvent(QEvent.User)
data = {}
data['tracknum'] = 0
data['state'] = 'enc'
data['percent'] = self.percent
data['track'] = 'Banco de Patricio'
data['genre'] = 'Christmas'
data['album'] = 'Patricio Nino'
data['artist'] = 'AAAorthman'
event.data = data
self.emit(SIGNAL('status(QEvent *)'), event)
self.percent += 10
示例2: ripper_event
# 需要导入模块: from PyQt4.QtCore import QEvent [as 别名]
# 或者: from PyQt4.QtCore.QEvent import data [as 别名]
def ripper_event(self, e):
""" """
event = QEvent(event_type(e.type))
event.data = e.__dict__
QApplication.instance().postEvent(self, event)