[PyQt] QPrinter PageRange problem

BLACK HAWK el_sakir12 at yahoo.com
Tue May 4 07:43:00 BST 2010


hi David Boddie

yes i'm the one who discussed this code with you on IRC , i'm thankful for that :)

but i didnt find proper solution for my problem that's why i re-posted it here 

you suggested before that i only view the pages i want to print only , and this solution doesn't work for me i need to render all pages to QPrintPreviewWidget and let the user choose what pages to print

i did some more investigation may be "QPrinter.setPrintRange(QPrinter.PageRange)" doesn't work

i add this lines to the code "print other.PrintRange()" at the last of "what_to_paint()" function
this should return number :
0=QPrinter.AllPages
1=QPrinter.Selection
2=QPrinter.PageRange
found it in documentation

but it always return 0

even if i changed the "other.setPrintRange(QPrinter.PageRange)" to "other.setPrintRange(QPrinter.Selection)" or "other.setPrintRange(QPrinter.AllPages)"

i hope u can confirm that or help me to understand if i can implement what i want in QT or not

thanks in advance ...



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


More information about the PyQt mailing list