tags:

views:

32

answers:

1

I mean when the Dialog pop up, some files according to the filer are in selected state. Does QFileDialog has a way to do this?

+5  A: 
QFileDialog fd;
// Enable multple selection
fd.setFileMode( QFileDialog::ExistingFiles);
// Select the files you need
fs.selectFile( "MyFirstFile");
fs.selectFile( "MySecondFile");
Cătălin Pitiș
Thank you very much.But there are mistakes and it should select multi file using following: QFileDialog fd; // Enable multple selection fd.setFileMode( QFileDialog::ExistingFiles); // Select the files you need fd.selectFile( "\"main.cpp\" \"main.o\""); fd.exec(); return;By the way, how to place code in here like you?
sean
When editing the question (or answer) you have some formatting buttons above the edit box. You can use them.
Cătălin Pitiș