[PyQt] Printing in PyQt

primalcharlie charlie.hardy at outlook.com
Sat Feb 21 15:44:10 GMT 2015


Hi
I've had a look through the examples in pyqt there were none on printing
that i could find :/. I'm attempting to print the whole screen including all
its subwidgets and I attempted to do so by attempting to translate the code
from the QtDocs ( Qt docs printing a widget
<http://doc.qt.io/qt-5/qtprintsupport-index.html#printing-widgets>  ) which
is in c++ (which i don't have a clue how to do!). In basics I want to fit
and scale a whole screen with its subwidgets to fit and print on paper. Also
If its possible just how to do one widget as well would be great!

Thanks
Charlie

btw current error im getting is: 
painter.translate((printer.paperRect().x()) +
(printer.pageRect().width()/2),(printer.paperRect().y) +
(printer.pageRect().height()/2))
TypeError: unsupported operand type(s) for +: 'builtin_function_or_method'
and 'float'



--
View this message in context: http://python.6.x6.nabble.com/Printing-in-PyQt-tp5086981p5087043.html
Sent from the PyQt mailing list archive at Nabble.com.


More information about the PyQt mailing list