printer pdfformat cancel closes print preview window.
Unsolved
General and Desktop
-
I have a print preview dialog when i click on the print button it opens a dialog box and i can enter the file name of the pdf file. but when i press cancel it closes the dialog box and print preview window is this designed this way or a bug?
QPrinter printer( QPrinter::HighResolution ); printer.setOutputFormat(QPrinter::PdfFormat); printer.setOrientation( QPrinter::Portrait); printer.setPageMargins(QMarginsF(12.5, 12.5, 12.5, 12.5), QPageLayout::Millimeter); QPrintPreviewDialog preview( &printer, this ); connect( &preview, SIGNAL(paintRequested(QPrinter*)), SLOT(displayonly(QPrinter*)) ); connect( &preview, SIGNAL(destroyed(QObject*)), SLOT(Change())); preview.exec();
-
Hi,
What does the
Change slot
do ? -
Can you show the complete code you are using, including the call to your custom dialog to get the file path ?