Python PyQt Pyside - setNameFilters in QFileDialog does not work
问题 (Windows 7 64 Bit, PyCharm 3.4.1 Pro, Python 3.4.0, PySide 1.2.2) I want to make a file dialog with filters and preselect one filter. If i use the static method, it works, i can use filters and preselect one filter. dir = self.sourceDir filters = "Text files (*.txt);;Images (*.png *.xpm *.jpg)" selected_filter = "Images (*.png *.xpm *.jpg)" fileObj = QFileDialog.getOpenFileName(self, " File dialog ", dir, filters, selected_filter) If i use an object it does not work, my filters are not there.