[Qt-interest] [SOLVED] Re: How to implement a `Stop Button' ?
Aaron Lewis
aaron.lewis1989 at gmail.com
Fri May 14 05:06:42 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/11/2010 04:18 PM, Andre Somers wrote:
>
> The first thing to do when you have a (potentially) long operation, to
> make it non-blocking on your UI.
> There are many ways to do that, the main two ways include using a worker
> thread or cutting up your problem in little chuncks and using a single
> shot 0 ms timer to process the next part of the operation. Personally, I
> would stear clear of using QCoreApplication::processEvents().
>
Merci André , i'd try to implement a QThread based class which will
dedicated on String Searching , and emit a signal to set text in User
Interface.
> Once you have your operation running non-blocking, you can also create a
> functional stop button.
Exactly.
- --
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvsvkEACgkQvf41sEptMqBrRACgoYdGk1bjMGKKpEjiKRkDZFi5
y64AoKfsNRxevtYhdq5lNS1i+nLa1r+C
=kEcB
-----END PGP SIGNATURE-----
More information about the Qt-interest-old
mailing list