[clug] long run function in trolltech qt widget

jm jeffm at ghostgun.com
Wed Dec 3 05:02:13 GMT 2008


Anyone out there familar enough with Trolltech's QT to help me with this 
problem? I have a function which I didn't write, lets call this 
long_run(), which takes a few seconds to run. Luckily it takes a call 
back function, label this callback(), which it calls every now and then 
so you know things are progressing nicely. What I wish to do is display 
a wizard (using QWizard) so that the user can enter the required data 
and be stepped through the process then in one of the wizards pages run 
long_run() and display a QProgressBar to indicate that things are going 
on in the background. I've worked out how to pass C++ classes though C 
call and to get them execute (or at least not to crash). The problem is 
that I haven't worked out how to make the call to long_run() so that it 
starts when the relevent wizard page is displayed. I've tried 
implementing show() but that waits for the call to finish before 
displaying the page. Any suggestions from the collective?

Jeff.



More information about the linux mailing list