QString name_file1 = "datchic1.txt"; QFuture <bool> future1a= QtConcurrent::run(tempiratura_datchika,tn1,name_file1,nms,ftHandle1,serial1); if (future1a==true) { QFuture <int> start_tect1= QtConcurrent::run(Start_test,tk1,name_file1,nms,ftHandle1,serial1); //Tyd1=Tyd1-start_tect1; if (start_tect1==1) { QFuture <void> test_times1 = QtConcurrent::run(time_test_2,Tyd1,name_file1,ftHandle1,serial1); } }
C++ (Qt)QFutureWatcher <bool> mWatcher; // член класса...// запускаемQObject::connect(theWatcher, SIGNAL(finished), this, SLOT(tempiratura_datchika_finished)); // this и имя слота поменять на что нужноmWatcher.setFuture(QtConcurrent::run(tempiratura_datchika,tn1,name_file1,nms,ftHandle1,serial1));
C++ (Qt)while ( !future1a.isFinished() ){ QCoreApplication::processEvents();}if (future1a==true)...