@Lasith Why is your main window a dialog? How do you show main window? If you use exec() then it is a modal window.