<div dir="ltr">Dear all,<div><br></div><div>I found a strange behaviour (a bug ?) In the new implementation of QFileDialog I'm using with Qt5.7 / PyQt5.7. </div><div><br></div><div>In short, the static function QFileDialog.getOpenFileNames() which is expected to let the user selet more than one file and return a list, does only half of the job. The dialog is executed with FileMode set to QFileDialog.ExistingFiles (so that the user can select more than one file) but the function returns only the first file of the list (the first clicked file, to be precise). A workaround is to instantiate the class QFileDialog and use it:</div><div><br></div><div><div>q = QtWidgets.QFileDialog()</div><div>q.setAcceptMode(QtWidgets.QFileDialog.AcceptOpen)</div><div>q.setFileMode(QtWidgets.QFileDialog.ExistingFiles)</div><div>fnames = q.selectedFiles()<br></div></div><div><br></div><div>Should it be considered a bug or was I wrong in using the static function ?</div><div><br></div><div>Massimo</div><div><br><div class="GmSign">-- <br><div dir="ltr"><font size="1" face="'times new roman', serif"><font color="#000066">Dr Massimo Vassalli</font></font><div><font size="1" face="'times new roman', serif"><font color="#000066">NanoBioScience Goup - <a href="http://www.nanobioscience.eu" target="_blank">www.nanobioscience.eu</a><br>Institute of Biophysics - National Research Council</font></font><div><font size="1" face="'times new roman', serif"><font color="#000066">Genova - Italy<br>T: +39 010 6475 571</font></font></div></div></div></div></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr">--<br>
Dr Massimo Vassalli<br>
Institute of Biophysics<br>
National Research Council<br>
Genova - Italy<br>
+39 010 6475 571</p>
</div></div>