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ș
2010-10-19 09:47:12
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
2010-10-19 17:37:08
When editing the question (or answer) you have some formatting buttons above the edit box. You can use them.
Cătălin Pitiș
2010-10-19 17:52:38