当前位置: 首页>>代码示例>>Python>>正文


Python QtCore.QEventLoop方法代码示例

本文整理汇总了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) 
开发者ID:Macr0phag3,项目名称:email_hack,代码行数:24,代码来源:email_hacker-GUI.py

示例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) 
开发者ID:seoulai,项目名称:gym,代码行数:9,代码来源:graphics.py

示例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_() 
开发者ID:rootzoll,项目名称:raspiblitz,代码行数:7,代码来源:main.py

示例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 
开发者ID:SeptemberHX,项目名称:screenshot,代码行数:11,代码来源:screenshot.py

示例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))
                      ]} 
开发者ID:CadQuery,项目名称:CQ-editor,代码行数:37,代码来源:debugger.py

示例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_() 
开发者ID:seoulai,项目名称:gym,代码行数:7,代码来源:graphics.py


注:本文中的PyQt5.QtCore.QEventLoop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。