Python PyQt5.QtCore.QEventLoop() Examples

The following are 6 code examples for showing how to use PyQt5.QtCore.QEventLoop(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module PyQt5.QtCore , or try the search function .

Example 1
Project: email_hack   Author: Macr0phag3   File: email_hacker-GUI.py    License: MIT License 6 votes vote down vote up
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) 
Example 2
Project: raspiblitz   Author: rootzoll   File: main.py    License: MIT License 5 votes vote down vote up
def run(self):
        log.info("starting beat ..")
        self.beat_timer.start(self.interval)
        loop = QEventLoop()
        loop.exec_() 
Example 3
Project: screenshot   Author: SeptemberHX   File: screenshot.py    License: GNU General Public License v3.0 5 votes vote down vote up
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 
Example 4
Project: CQ-editor   Author: CadQuery   File: debugger.py    License: Apache License 2.0 5 votes vote down vote up
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))
                      ]} 
Example 5
Project: gym   Author: seoulai   File: graphics.py    License: MIT License 5 votes vote down vote up
def checkPLAYMODE(self):
        while self.btnset.PLAYMODE == Constants.playmode_pause:
            loop = QEventLoop()
            QTimer.singleShot(10, loop.quit)
            loop.exec_() 
Example 6
Project: gym   Author: seoulai   File: graphics.py    License: MIT License 5 votes vote down vote up
def show(param, msg="done", time=300):
    loop = QEventLoop()
    QTimer.singleShot(time, loop.quit)
    loop.exec_()

    graphics.update(param)
    graphics.setVisible(True)