I have an QT application that load some file but it take some time . I start the loading process in another thread but the problems is my background gui is freezed will the loading process is still ruing . I want to hide the main gui wile the thread is still running and another window with a loading git to appear in the meantime when the thread has finished the window to disappear and make the main gui reappear
Here is my code :
std::thread loading(&RecVideoReader::initTimeStempMap,&recvideo);
QLabel *lbl = new QLabel;
QMovie *movie = new QMovie("Gear-5s-200px.gif");
lbl->setMovie(movie);
lbl->show();
movie->start();
while(!recvideo.isMapInit()){
this->hide();
Sleep(1000);
}this->show();
loading.join();
movie->stop();
lbl->hide();