The question was not trivial. The method specified below worked, for a single-threaded program, in a multi-threaded pause fails. Please tell me the correct option.
class Sleep: public QThread { public: static void msleep(int ms) { QThread::msleep(ms); } }; ... Sleep::msleep(1000); ... Further, the approximate architecture of my application:
int main(int argc, char *argv[]) { QApplication a(argc, argv); ... TransportMail *tm = new TransportMail(); TaskThred thredTm; tm->moveToThread(&thredTm); thredTm.start(); ... } void TransportMail::sendMail(QString mail) { ... sleep(10); // не работает ... }