[PyQt] Qfiledailoug multiple file selection

klia alwaseem307ster at yahoo.com
Tue Mar 10 11:07:44 GMT 2009




Detlev Offenbach wrote:
> 
> On Samstag, 7. März 2009, klia wrote:
>> Detlev Offenbach wrote:
>> > On Freitag, 6. März 2009, klia wrote:
>> >> Hey folks;
>> >>
>> >> How can i be able to select multiple files whenever i browse my
>> >> directory using QfileDailoug?
>> >>
>> >> this is the code to call up the filedailoug
>> >>
>> >> files = QtGui.QFileDialog.getOpenFileName(self,  'Open file','/home/',
>> >> ("Images (*.png *.tiff *.jpg)"))
>> >
>> > Just use "getOpenFileNames(...)". See the docs for more details.
>> >
>> >> Thank you
>> >
>> > --
>> > Detlev Offenbach
>> > detlev at die-offenbachs.de
>> >
>> > _______________________________________________
>> > PyQt mailing list    PyQt at riverbankcomputing.com
>> > http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>> Thank you Detlev Offenbach it worked but python complaining that there's
>> no
>> buffer or string to hold the selected files in order to process
>> them...............Any idea
> 
> Just call it like this:
> 
>         fileNames = QFileDialog.getOpenFileNames(\
>             self,
>             self.trUtf8("Add Documentation"),
>             QString("/home"),
>             self.trUtf8("Qt Compressed Help Files (*.qch)"))
> 
> Detlev
> -- 
> Detlev Offenbach
> detlev at die-offenbachs.de
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> 
hey man;
it worked perfectly after commenting this line:
#data = file.read()

anyway, i still have one more question, in my interface i have few buttons
that should be linked with functions, my functions are in separate .py files
but some of the functions when i execute them from terminal they should be
in this syntax 
waseem at home:~$python csv2sql.py -t my_table photos.csv | sqlite 3 photos.db
how can i be able to link such a function with this syntax in pyqt? 
-- 
View this message in context: http://www.nabble.com/Qfiledailoug-multiple-file-selection-tp22369488p22432064.html
Sent from the PyQt mailing list archive at Nabble.com.




More information about the PyQt mailing list