Hey,
i got some problems here, but cannot find any answer (googled for a while now)

I'm doing some parallel calculation with QFutureWatcher. Basically it works fine, but if I fetch some global parameters from a file before I start the calculation, the threads of the watcher won't finish anymore.
at the moment I use QSettings to read the file, but it also happened with QFile.
If I remove the code which reads the file it everything works fine.

Am I missing something?

The Code to read the file:
Qt Code:
  1. QString fileName=QFileDialog::getOpenFileName(this,tr("load magnets ..."),QDir::homePath(),tr("File (*.ini)"));
  2. if(fileName.length()>0) {
  3. QSettings *settings = new QSettings(fileName,QSettings::IniFormat);
  4. QStringList list_of_magnets = settings->childGroups();
  5. foreach (QString magnet, list_of_magnets) {
  6. settings->beginGroup(magnet);
  7. addMagnet( ... );
  8. settings->endGroup();
  9. }
  10. delete settings;
  11. }
To copy to clipboard, switch view to plain text mode