[PyQt] Re: Code example for QPrinter (PyQt4)
Eduardo Willians
edujurista at gmail.com
Mon Jan 19 16:27:48 GMT 2009
Better:
<code>
#!/usr/bin/env python
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
Appli=QApplication(sys.argv)
printer=QPrinter()
doc=QTextDocument("Hello" )
dialog = QPrintDialog(printer)
dialog.setModal(True)
dialog.setWindowTitle("Print Document" )
# dialog.addEnabledOption(QAbstractPrintDialog.PrintSelection)
if dialog.exec_() == True:
doc.print_(printer)
</code>
More information about the PyQt
mailing list