I am newbie in Qt and using PyQt. I want to print a form on a pdf file. How can I perform this.

I found a piece of code here :

http://www.qtcentre.org/forum/f-qt-p...light=qprinter

but I'm not sure how to adapt it to the pyqt