I have heavy task. I created QProgressBar for displaying that programm still work and runned heavy task in another thread using c++ std::thread class. But QProgressBar don't work, only window with QProgressBar starts. Here is the code:
QProgressBar progress;
progress.setRange(0, 0);
progress.show();
if (keyLength == 1024)
std::thread(&RSA::generateKeys, &rsa, RSA::RSA_1024).join();
else if (keyLength == 2048)
std::thread(&RSA::generateKeys, &rsa, RSA::RSA_2048).join();