PySide: QFileDialog.getOpenFileName returns string of tuple instead of just string
I'm trying to convert an application from PyQt4 to Qt and have found what appears to be a difference in the return results from QFileDialog.getOpenFileName
I'm calling QFileDialog with the following call:
filepath = unicode(QFileDialog.getOpenFileName(self,
"Species Explorer - Open Species", dir,
"Species Files (*.species)"))
When I use PyQt4 I just get a string with the file selected using the dialog box. For example:
C:/production/species/testSpecies.species
When I use PySide I get a string that contains a tuple with two sub-strings: the filename and the value of the filter. For instance:
(u'C:/production/species/testSpecies.species', u'Species Files (*.species)')
Is this the expected behaviour? :confused:
I'm using PySide for Windows, pyside-0.4.0-py2.6
Re: PySide: QFileDialog.getOpenFileName returns string of tuple instead of just strin
BTW... is there a forum for PySide other than just the Qt General one???
Re: PySide: QFileDialog.getOpenFileName returns string of tuple instead of just strin
The same thing in Qt:
The filter selected is set to selectedFilter.
[url]http://doc.qt.nokia.com/4.6/qfiledialog.html#getOpenFileName[/url]