Hello,

A follow on to this post of mine.
http://www.qtcentre.org/threads/6695...dow-to-QDialog

I've progressed a little, thanks to your help.
Another problem.
I'm emitting a signal early in the noobsForm init process, which is not getting called.
I've read somewhere that signals and slots are set up sometime in the process but are not guaranteed when.
I added a process events call, no help.
Is this my problem? If it is, is there any round it?

Regards
Qt Code:
  1. mainwindow.cpp
  2. noobsForm myNoobs(listPart, file);
  3.  
  4. QObject::connect(&myNoobs, SIGNAL(doFormat(int, bool)),
  5. this, SLOT(formatSDcard(int, bool)));
  6. QObject::connect(&myNoobs, SIGNAL(doWriteNoobs(int, bool, QString)),
  7. this, SLOT(writeNoobs(int, bool, QString)));
  8. QObject::connect(&myNoobs, SIGNAL(doUpdateDriveDataList()),
  9. this, SLOT(getLogicalDrivesSlot()));
  10. ****
  11. QObject::connect(&myNoobs, SIGNAL(doGetFileCount(QString)),
  12. this, SLOT(getUpdatedFileCount(QString)));
  13. ****
  14. myNoobs.exec();
  15.  
  16. void MainWindow::getUpdatedFileCount(QString driveLetter) //slot
  17. {
  18. qDebug() << "getupdatedfilecountSlot" << driveLetter;
  19. //getFileList(driveLetter);
  20. //qDebug() << countFiles << "-" << countDirs;
  21. //emit doUpdateFileList(countFiles, countDirs);
  22. }
  23.  
  24. mainwindow.hpp
  25. public slots:
  26. bool formatSDcard(int type, bool remote);
  27. void writeNoobs(int which, bool remote, QString file);
  28. void getLogicalDrives(); // find attached USB devices
  29. void getUpdatedFileCount(QString driveLetter);
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. noobsForm.cpp
  2. This is in the noobsForm init process:-
  3. delay(1000); //process events - ? required
  4. qDebug() << "passed letter" << (driveLetter + ":");
  5. emit doGetFileCount(driveLetter + ":");
  6.  
  7. These are triggered by pushbuttons and work:-
  8. emit doFormat(type, true);
  9. emit doWriteNoobs(1, true, address);
  10. emit doUpdateDriveDataList();
  11.  
  12. noobs.hpp
  13. signals:
  14. void doFormat(int, bool);
  15. void doWriteNoobs(int, bool, QString);
  16. void doUpdateDriveDataList();
  17. void doGetFileCount(QString);
  18.  
  19. Debug output:-
  20. passed letter "J:"
To copy to clipboard, switch view to plain text mode