So here's the thing. I am developing a tool for building screens for you program or game using pygame. I am wanting to use PyQt for creating gui windows for all the options and control. My problem is that I need to be able to create a program loop the will keep things running with pygame, example: getting if the user clicked on the x button in pygame. How do I create a loop that will allow me to do this? I have tried to look at the example programs that come with PyQt but I can't figure out how they make the loops work.