Run until there are no more events.
        This only looks at events scheduled through the event loop.

def run(self):
        """Run until there are no more events.
        This only looks at events scheduled through the event loop.
        """
        self._stop = False
        while not self._stop:
            have_sources = self._timers or self._readers or self._writers
            if not self._processor.pending and not have_sources:
                break
            events = QEventLoop.AllEvents
            if not self._processor.pending:
                events |= QEventLoop.WaitForMoreEvents
            self._qapp.processEvents(events)
            if self._processor.pending:
                self._processor.run()