[Qt-interest] How to implement a `Stop Button' ?

Aaron Lewis aaron.lewis1989 at gmail.com
Tue May 11 10:11:43 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
	I tried to implement a function with QPushButton , that will stop a
task that is running.

	e.g A function used to search for specify strings in all of the files
inside a directory , if the directory has a long scope , user may want
to stop it.

	So far what i did is make the QPushButton checkable , and during the
loop in the directory , everytime before i search in a file , i will
check if the Button is `checked'.
	If it's checked , jump out of the loop immediately , and stop searching.


	The problem is , during the search function , user interface will stop
answering me , so i won't be able to click on the button , in that case
, i can't stop the search function.

	Does anyone has any ideas ?

	Thanks in advance !


- -- 
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/

iEYEARECAAYFAkvpET4ACgkQvf41sEptMqBrhgCglSEad0uAtL8lWqqxz7zydiV1
KJAAoKXt1zrKPTXEjX4jcsIjZYq0uDaL
=ggbU
-----END PGP SIGNATURE-----



More information about the Qt-interest-old mailing list