I'm using pyqt as an infinity loop, but I don't know how to escape from it programmatically, or pythonically. below is my code.
from PyQt4.QtGui import QApplication
loop = QApplication([])
main()
loop.exec_()
I want to write in my main() function like, if some condition is satisfied, then escape.
I'm absolutely new to programming, I've been trying to find any clue on google, like close() or something, nothing works.
any help, hint would be appreciated. thank you.