Molier
5th December 2010, 01:59
I still make frist steps with Threads, however i know how they work.
I have a strange situation:
- MainWindow which based on (inherits) QMainWindow (this class contains method calculate(), and variable bool StartStop)
Variable StartStop is steered by button (on/off).
I want use calculate method when i click on a button.
Unfortunately calculate method is not so short. So calculate() takes some time, and GUI of program does not respond.
Is there any nice opportunity to put a thread which is sensitive for StartStop variable?
Note that this is only one class. Moreover calculate() operates on some variables of MainWindow class.
I was thinking of emitting signals. Any other ideas?
I have a strange situation:
- MainWindow which based on (inherits) QMainWindow (this class contains method calculate(), and variable bool StartStop)
Variable StartStop is steered by button (on/off).
I want use calculate method when i click on a button.
Unfortunately calculate method is not so short. So calculate() takes some time, and GUI of program does not respond.
Is there any nice opportunity to put a thread which is sensitive for StartStop variable?
Note that this is only one class. Moreover calculate() operates on some variables of MainWindow class.
I was thinking of emitting signals. Any other ideas?