Python PyQt5.QtCore.QEventLoop() Examples

The following are 6 code examples of PyQt5.QtCore.QEventLoop(). 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 also want to check out all available functions/classes of the module PyQt5.QtCore , or try the search function .
Example #1
Source File: debugger.py    From CQ-editor with Apache License 2.0 6 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 #2
Source File: email_hacker-GUI.py    From email_hack with 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 #3
Source File: main.py    From raspiblitz with 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 #4
Source File: screenshot.py    From screenshot with 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 #5
Source File: graphics.py    From gym with 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
Source File: graphics.py    From gym with 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)