[PyQt] printing in Windows not working - tested on Vista 32 bits

Rodrigo rodrigohaas at gmail.com
Fri Dec 31 17:17:11 GMT 2010


Hello!

I use (Ubuntu 64bit 10.10 + PyQt 2.7 + Python 4.8.2) and QPrintDialog 
works perfectly. Including the ability to save in PDF. But when tested 
on Windows Vista 32bits simply nothing appears, not even an error 
message. The application works perfectly, but when calling the 
QPrintDialog, nothing ...

Already installed to the latest stable version of PyQt 4.8.2 on sight, 
but still the same behavior. Has been there? Is it necessary for some 
differentiation in the code that runs on windows? Already searched the 
internet but did not.


Thanks,

Rodrigo


My code:
------------------------------------------------------------------------
def print(self, string):

     printDialog = QPrintDialog(self.printer, self)

     if printDialog.exec_():
         filePrint = QTextDocument()
         filePrint.setDefaultFont(QFont('Liberation Sans',10))
         filePrint.setHtml(string)
         filePrint.print_(self.printer)
------------------------------------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101231/f0f6dee8/attachment.html>


More information about the PyQt mailing list