add setResult in MainWindow