[Qt-interest] How to implement a `Stop Button' ?
Richard Moore
richmoore44 at gmail.com
Wed May 12 10:42:16 CEST 2010
On Wed, May 12, 2010 at 3:00 AM, Michael Jackson
<mike.jackson at bluequartz.net> wrote:
> You will need to push your searching for the strings task onto its own
> thread. There are several ways to do this. The Qt Documentation goes into
> detail on how to do this. Some ideas would be the following:
>
> Hook up some signals/slots between the gui button and the task so that when
> the user clicks the "Stop" button a signal is sent to the thread that marks
> it for cancelation.
>
> When the task is completed, signal the mail thread to set the GUI back to a
> proper state.
I wrote a simple example that shows how you can do this sort of thing
at http://www.kdedevelopers.org/node/4138
Rich.
More information about the Qt-interest-old
mailing list