mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 19:20:45 +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.setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
w.setOption(QFileDialog::ShowDirsOnly, false);
|
w.setOption(QFileDialog::ShowDirsOnly, false);
|
||||||
w.setNameFilters(viatom.getNameFilter());
|
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) {
|
if (w.exec() == QFileDialog::Accepted) {
|
||||||
QString filename = w.selectedFiles()[0];
|
QString filename = w.selectedFiles()[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user