Yeah that's what I was expecting but, I guess il need to use filename= filename[0] to get what I need, thanks.
Yeah that's what I was expecting but, I guess il need to use filename= filename[0] to get what I need, thanks.
Are you sure you're not using QFileDialog::getOpenFileNames() - notice the plural, which does return a QStringList...
Yeah I'm using getOpenFileName(), but I tried getOpenFileNames() aswell just to see what I'll get, it was this :
(['/home/whatever/Tekst.txt'], '')
Last edited by vuletic; 14th March 2015 at 12:40.
Could be a bug in PyQt I guess... The return from getOpenFileName is a QString, not a QStringList.
I don't think it is a bug. I'd suspect the second entry from the tuple returns the selected filter.
Bookmarks