In my PyQt app I'm trying to run native but custom QFileDialog.
My code looks like this.
dlg = QtGui.QFileDialog(self, caption=self.tr("Select a file")))
dlg.setNameFilters("Text files (*.txt)")
if dlg.exec_():
name = dlg.selectedFiles()
but this shows a Qt dialog, not native. I've tried
dlg.setOption(QtGui.QFileDialog.DontUseNativeDialog, False)
but this didn't help.
How do I run custom native QFileDialog?