modify the signal/slot to finish 'return main window' function