I use to write QGis plugins, which is based on PyQT. I use to create QButtons and connect their click to a function that itself calls a QFileDialog.
For example:
def doOpenFile(self):
fname = QFileDialog.getOpenFileName(self.dlg, self.tr("Open input file") )
if fname:
self.dlg.editInFile.setText(fname)
# ____________
def doInitGUI(self):
# connect buttons
self.dlg.buttonInFile.clicked.connect( self.doOpenFile )
So: I click on a button, which triggers a QFileDialog interface. Quite ofter (but not always, and I could not define the conditions), the QFileDialog will re-open itself after clicking on "OK" or "Cancel". It requires me to cancel several times to stop the QFileDialog re-opening. I suppose that the click event is thrown several times, is it correct? How can I solve this behavior?