I'm having some trouble with a QProgressDialog on my app.
When the user clicks on a calculation button, I show a QProgressDialog that is updated from a QThread (I don't think this is related to the problem), and when this QThread finishes I call a function that closes the QProgressDialog .
progressDialog->setValue(100);
progressDialog->close();
It seems to be working.
But if the user clicks on the calculation button and minimizes the app (main window), the QProgressDialog don't close:
I already checked and the code is reaching on the command:
progressDialog->close();
I don't know what is happening, can someone help me?
Thanks
我通过在进度对话框中添加以下属性解决了该问题:
progressDialog->setAttribute(Qt::WA_DeleteOnClose, true);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.