set Visible moved to the MainWindow constructor