Show window in parallel
-
Hello!!
I have a function that takes a long time to run in MainWindow. How can I launch a window in parallel for the duration of the process?
Thank you very much!
Run this function in a new thread.
- Create worker
QObject - Let the worker do your "work" (put your function there)
- Create new
QThreadandmoveToThreadyour worker. - Then you can communicate with signals and slots with your thread / worker and do something else in your
MainWindow(show another window or do some other stuff)
Like here
- Create worker
-
Hi,
Depending on what that function does, QtConcurrent::run might be a simpler alternative.