I found this, but the links to the source code are broken:

http://labs.trolltech.com/blogs/2007...-clear-button/