How to create a Print Preview Dialog for a method
-
@JonB Well the Valentina report is written with Qt I have been able to integrate with PyQt5. The developers have not written a Dialog for the print method yet, when I asked I was told I can use pyQt5 to create a custom Dialog so I was hoping
QPrintPreviewDialog
will do the magic for me. Below is the image they suggested it could be done using pyqt.
-
@LT-K101 said in How to create a Print Preview Dialog for a method:
Well the Valentina report is written with Qt I have been able to integrate with PyQt5.
Is it really that hard to provide a link to this thing if you want help with it, after being asked to do so several times? I just don't get why you don't....
A custom dialog to invite the user to print is not the same thing as a
QPrintPreviewDialog
to allow previewing of the output. -
@LT-K101
Seriously, in what way? Create aQDialog
to ask the user if they want to print, whether to file or physical printer? And/or maybe aQFileDialog
to let the user pick a file/location to save to?Or maybe that inbuilt Windows Print dialog is all user needs anyway, seems to offer print to printer or to file?
-
@JonB said in How to create a Print Preview Dialog for a method:
maybe that inbuilt Windows Print dialog is all user needs anyway, seems to offer print to printer or to file?
Creating the a Dialog to offer print to printer or to file which will connect to my print method is what I need please.
-
@LT-K101
You write a dialog to ask the user whether they want to print and if they say yes you callprintToLocalPrinter()
orprintToDisk()
or similar. I'm not writing that for you, it's a dialog, I have no idea what your issue is. You also already have aprintReport()
shown earlier which does agetSaveFileName()
and callsprintToDisk(filename)
, so I don't know what your problem is.