本文整理汇总了Python中PyQt5.QtCore.QEventLoop方法的典型用法代码示例。如果您正苦于以下问题:Python QtCore.QEventLoop方法的具体用法?Python QtCore.QEventLoop怎么用?Python QtCore.QEventLoop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtCore
的用法示例。
在下文中一共展示了QtCore.QEventLoop方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Run
# 需要导入模块: from PyQt5 import QtCore [as 别名]
# 或者: from PyQt5.QtCore import QEventLoop [as 别名]
def Run(self):
items = ['From Address',
'To Address',
'Email Subject',
'Thread Num',
'Verbose',
'Crazy Mode',
'Body']
Attrs = self.GetAttrs()
for item in items:
if item not in Attrs:
return
InitVars(Attrs)
if SMTP_addr:
ver = "go"
Launcher()
else:
threads_alive = [0]
quit(0, 0)
#loop = QEventLoop()
#QTimer.singleShot(1000, loop.quit)
示例2: show
# 需要导入模块: from PyQt5 import QtCore [as 别名]
# 或者: from PyQt5.QtCore import QEventLoop [as 别名]
def show(param, msg="done", time=300):
loop = QEventLoop()
QTimer.singleShot(time, loop.quit)
loop.exec_()
graphics.update(param)
graphics.setVisible(True)
示例3: run
# 需要导入模块: from PyQt5 import QtCore [as 别名]
# 或者: from PyQt5.QtCore import QEventLoop [as 别名]
def run(self):
log.info("starting beat ..")
self.beat_timer.start(self.interval)
loop = QEventLoop()
loop.exec_()
示例4: take_screenshot
# 需要导入模块: from PyQt5 import QtCore [as 别名]
# 或者: from PyQt5.QtCore import QEventLoop [as 别名]
def take_screenshot(flags):
loop = QEventLoop()
screen_shot = Screenshot(flags)
screen_shot.show()
screen_shot.widget_closed.connect(loop.quit)
loop.exec()
img = screen_shot.target_img
return img
示例5: __init__
# 需要导入模块: from PyQt5 import QtCore [as 别名]
# 或者: from PyQt5.QtCore import QEventLoop [as 别名]
def __init__(self,parent):
super(Debugger,self).__init__(parent)
ComponentMixin.__init__(self)
self.inner_event_loop = QEventLoop(self)
self._actions = \
{'Run' : [QAction(icon('run'),
'Render',
self,
shortcut='F5',
triggered=self.render),
QAction(icon('debug'),
'Debug',
self,
checkable=True,
shortcut='ctrl+F5',
triggered=self.debug),
QAction(icon('arrow-step-over'),
'Step',
self,
shortcut='ctrl+F10',
triggered=lambda: self.debug_cmd(DbgState.STEP)),
QAction(icon('arrow-step-in'),
'Step in',
self,
shortcut='ctrl+F11',
triggered=lambda: None),
QAction(icon('arrow-continue'),
'Continue',
self,
shortcut='ctrl+F12',
triggered=lambda: self.debug_cmd(DbgState.CONT))
]}
示例6: checkPLAYMODE
# 需要导入模块: from PyQt5 import QtCore [as 别名]
# 或者: from PyQt5.QtCore import QEventLoop [as 别名]
def checkPLAYMODE(self):
while self.btnset.PLAYMODE == Constants.playmode_pause:
loop = QEventLoop()
QTimer.singleShot(10, loop.quit)
loop.exec_()