I have made an application to perform complex calculations (it lasts several minutes or more) and I have found that if the app Lose focus, it freezes if I focus on this, it's working well, this is a button that I have done with Qt Designer. There is 2 progress which stops when QMainWindow loses focus. Have you ever heard of this problem? Maybe it comes from one of the QMainWindow properties? Thanks for your help
Edit: Even if the UI freeze, the calculation is still going on, but it is boring for the user.
Looks like you're calculating on the main (GUI) thread. Create a separate, worker object for processing of calculations and take it to a new thread.
This is a great example of how to do it.
No comments:
Post a Comment