QString str = QFileDialog::getOpenFileName(0, "Open Dialog", "", "*.plot");if(!str.isEmpty()) //close();
C++ (Qt)QString str = QFileDialog::getOpenFileName(0, "Open Dialog", "", "*.plot");if(str.isEmpty()) close(); // или qApp->quit()
C++ (Qt)app.setQuitOnLastWindowClosed(true);