HI All,
I have a QT widget app, which on bootup creates a new thread(Thread2) while main thread is on welcome screen(Parent window). The Aim of Thread2 is initialize all the subsequent screens which are nothing but multiple window constructors. My welcome screen has a loading gif image which loaded as movie . The problem here is when Thread2 spans, The main thread is becoming unresponsive until thread2 completes. This is making the welcome screen looks hanged as gif image movie is not playing.

Can any one help me how to resolve this problem?

Qt Code:
  1. // Gif image
  2. movie = new QMovie(":/resources/resources/other/loader.gif");
  3. movie->setScaledSize(QSize(ui->gif_label->width(),ui->gif_label->height()));
  4. ui->gif_label->setMovie(movie);
  5. movie->start();
  7. //Thread span Process fn
  8. thread2::process()
  9. {
  10. MainMenuScreen = new MainMenu(this);
  11. MainMenuScreen->InitScreens(); // This intScreens fn has all window constructors
  12. }
To copy to clipboard, switch view to plain text mode