I'm struggling with the following problem for quite some time. My application runs heavy mathematical equations based on input files. The actual work is done within a separate thread. This way the GUI remains responsive. Everything works great, but I just can't figure out how to update the GUI from the separate thread. While processing the equations I want the GUI to show which equation is currently processed.
I just recently started using QT. This because I need to develop a application that runs on both Windows and Mac. The concept of slots is hard to me. I have developed many applications using Xcode and Cocoa. In this environment I can create complicated multithreading applications (that continuously update the GUI) without any problem. My C++ knowledge is average.
It drives me crazy. I spend to much time figuring this out. And still no result.
To the point:
Who can create an sample project for me?
The sample must contain:
- GUI with one text-box / button
- Clicking the button starts a new thread
- The new thread executes a loop 5 times.
- The loop simulates a heavy process (for example by using 1-second sleep)
- Every time the loop starts the GUI is updated by appending a line to the textbox.
I'm willing to pay for your time. I definitely need some help here. Please keep the sample as simple as possible. This way i can understand how it works.
(A little desperate)