mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 18:50:44 +00:00
Fix Windows file dialog for loading Viatom files.
This commit is contained in:
parent
b96f22bcd9
commit
498451df4a
@ -2460,6 +2460,10 @@ void MainWindow::on_actionImport_Viatom_Data_triggered()
|
||||
w.setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
w.setOption(QFileDialog::ShowDirsOnly, false);
|
||||
w.setNameFilters(viatom.getNameFilter());
|
||||
#if defined(Q_OS_WIN)
|
||||
// Windows can't handle this name filter.
|
||||
w.setOption(QFileDialog::DontUseNativeDialog, true);
|
||||
#endif
|
||||
|
||||
if (w.exec() == QFileDialog::Accepted) {
|
||||
QString filename = w.selectedFiles()[0];
|
||||
|
Loading…
Reference in New Issue
Block a user