PyQt5 QFileDialog closes when filename clicked
问题 I am using PyQt5 QFileDialog.getOpenFileName . I am expecting the box to remain open until the "open" button is clicked. However, when I run the code on my Linux system, the dialog box closes immediately when the file name is clicked. On a Windows system, the box behaves as expected and remains open until the 'Open' button is clicked. The results are the same with or without the QFileDialog.DontUseNativeDialog option set. from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton,