I modified a Qt application to set main window to always be on top using the setWindowFlags(Qt::WindowStaysOnTopHint);. Now all of the dialogs appear underneath
setWindowFlags(Qt::WindowStaysOnTopHint);