I don't know if you have looked at this sample. It worked for me:

http://doc.trolltech.com/4.1/tools-p...asictools.html