PDA

View Full Version : Curious Problem QFileDialog getexistingdirectory



ndahiya
12th April 2009, 05:22
Hi all,
I am facing a peculiar problem with QFileDialog::getexistingdirectory. I am using QT with OpenCv. I need to process all the images(.tif) in a folder and save the processed images in a different folder. I get the files list like : QStringList files = path.entryList(filters);
path of first file " QString firstfile = files.first()"
but once i add the code to load the file as IplImage "IplImage *input = cvLoadImage((const char*)firstfile.toAscii()) it compiles fine but when I run it, the get input directory dialog box goes blank!! I tried everything including writing the paths of all files in a text file and then using that to load images. But I end up with the same problem...:(
SOS!!
Navdeep

skrzypu
14th April 2009, 10:14
Hi,
Can you show code for that problem?


Skrzypu

ndahiya
16th April 2009, 07:51
Hi,
I wrote a simple version of the program just to illustrate the problem I'm facing. I am attaching the code. In the following function void Widget::processfiles() try with this line commented and uncommented. // IplImage *input = cvLoadImage((const char*)firstfile.toAscii());

Thanks,
ndahiya