本文整理汇总了Python中PySide.QtCore.QCoreApplication.postEvent方法的典型用法代码示例。如果您正苦于以下问题:Python QCoreApplication.postEvent方法的具体用法?Python QCoreApplication.postEvent怎么用?Python QCoreApplication.postEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtCore.QCoreApplication
的用法示例。
在下文中一共展示了QCoreApplication.postEvent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: invoke_in_main_thread
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import postEvent [as 别名]
def invoke_in_main_thread(fn, *args, **kwargs):
QCoreApplication.postEvent(_invoker,
InvokeEvent(fn, *args, **kwargs))
示例2: releaseKey
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import postEvent [as 别名]
def releaseKey(self,key_code,text='',shift=0):
ev = QKeyEvent(QEvent.KeyRelease,
key_code,
shift,
text)
QCoreApplication.postEvent(Jaime.instance.view,ev)
示例3: run
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import postEvent [as 别名]
def run(self):
for i in range(3):
e=MyEvent(i);
QCoreApplication.postEvent(self.owner,e)
示例4: pressKey
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import postEvent [as 别名]
def pressKey(self,key_code,text='',shift=0):
ev = QKeyEvent(QEvent.KeyPress,
key_code,
shift,
text)
QCoreApplication.postEvent(Jaime.instance.view,ev)