According to Qt Docs

The window is modal to a single window hierarchy and blocks input to its parent window, all grandparent windows, and all siblings of its parent and grandparent windows.
So basically a model dialog will always block your mainwindow because its the parent of mdi