I have a program in Qt which has a main QMainWindow which creates other QMainWindows that it is the parent of. The problem is all the child QMainWindows are always on top of the parent QMainWindow and any application window from my application is always on top of any other window on the system that isn't part of my application unless the minimize button is pressed on my application.

I just want my application to be like a normal application where whichever window you select is brought to the front, and if a window from another application on the computer is selected then that window goes on top of my application since my application no longer has focus.

I've tried doing a findall in the project and removed all instances of raise(), lower(), and activateWindow() but nothing has changed so far and I doubt this is standard Qt behavior. Is there any other functions that I may be calling that would affect the window ordering? Alternatively is there a signal that QMainWindow has that I may be missing that is emitted when the window gains or loses focus so I can manually bring them to the front when they get focus, and lower the application somehow when none of my application windows have focus?

Thanks