I have a Qt application that loads some file after clicking on button. I am using QFileDialog to open files. Every time I close file dialog, the application main window (QMainWindow) is behind all other opened windows (internet browser, explorer etc.). Is this standard behaviour? And is there any way to prevent this? I tried I have a Qt application that loads some file af