QEventLoop

class PyQt5.QtCore.QEventLoop

C++ documentation