Connecting Tech Pros Worldwide Forums | Help | Site Map

Multiple file selection in Qfiledailoug

Newbie
 
Join Date: Oct 2008
Posts: 14
#1: Mar 6 '09
Hello guys

i was wondering how can i be able to have multiple file selection whenever i browse my directory and choose files using Qfiledailoug

this is the code to lunch the file dailoug

files = QtGui.QFileDialog.getOpenFileName(self, 'Open file','/home/', ("Images (*.png *.tiff *.jpg)"))

Thank you

boxfish's Avatar
Expert
 
Join Date: Mar 2008
Location: California
Posts: 478
#2: Mar 6 '09

re: Multiple file selection in Qfiledailoug


I have not used PyQt, but from what I read on the internet it looks like you can just pluralize the function's name:

files = QtGui.QFileDialog.getOpenFileNames(self, 'Open file','/home/', ("Images (*.png *.tiff *.jpg)"))

I hope this works.
Newbie
 
Join Date: Oct 2008
Posts: 14
#3: Mar 7 '09

re: Multiple file selection in Qfiledailoug


Thank you man, it worked but python complains that there is no buffer or string to hold the selected filles selected in order to processes them
Reply