HI
I am using QT4.01 on windows.

Our application has to fetch data from files and push into database.
I have written a class subclassing QThread, it feteches and pushes into database.
In GUI i am providing option to select multiple files.
Qt Code:
  1. for(nIndex =0 ; nIndex <strBinFileList.count(); ++nIndex)
  2. {
  3.  
  4. MyThread *ptr1 = new MyThread();
  5. connect(ptr1, SIGNAL(finished()), ptr1, SLOT(deleteLater()));
  6. ptr1->setName(strBinFileList[nIndex].toStdString().c_str());
  7. ptr1->start();
  8.  
  9. }
To copy to clipboard, switch view to plain text mode 
For single file it is working fine.
When i am selecting two files it is crashing.
i have tried with only two files with out using for loop.

Qt Code:
  1. MyThread *ptr1 = new MyThread();
  2. connect(ptr1, SIGNAL(finished()), ptr1, SLOT(deleteLater()));
  3. ptr1->setName(strBinFileList[0].toStdString().c_str());
  4. ptr1->start();
  5.  
  6. MyThread *ptr1 = new MyThread();
  7. connect(ptr1, SIGNAL(finished()), ptr1, SLOT(deleteLater()));
  8. ptr1->setName(strBinFileList[1].toStdString().c_str());
  9. ptr1->start();
To copy to clipboard, switch view to plain text mode 

Even then also it is crashing.

In backend two databases are created around 30% of data is inserted in to db.
Each files executes independent of other. There is no dependency on input files and output databases.

Thanks in Advance....