I am having Qt4 issues before Qt5. In my application, when the user presses the print button, two things should happen: one is that the PDF file is written to disk (which still works fine in the new version, so I know that some of the printing functions work properly), and another that QPrintDialog should execute exec (), and then send it to the connected printer.
I see a dialog when I start from my development machine. The application runs on a deployed machine, but QPrintDialog never displays and the document never prints.
I turn on print support. A.
QT += core gui network webkitwidgets widgets printsupport
I use Process Explorer to find out which DLL applications are using on my development machine, and I believe that everything is present. My application package includes:
- {myAppPath} \ MyApp [MyApp.exe, Qt5PrintSupport.dll, ...]
- {myAppPath} \ Plugins \ printsupport \ windowsprintersupport.dll
- {myAppPath} \ plugins \ imageformats [qgif.dll, qico.dll, qjpeg.dll, qmng.dll, qtga.dll, qtiff.dll, qwbmp.dll]
Below is the corresponding code snippet:
void PrintableForm::printFile() { //Writes the PDF to disk in every environment pdfCopy(); //Paper Copy only works on my dev machine QPrinter paperPrinter; QPrintDialog printDialog(&paperPrinter,this); if( printDialog.exec() == QDialog::Accepted ) { view->print(&paperPrinter); } this->accept(); }
My first thought is that the corresponding DLLs were not found, the print time, and this means that my application file system is incorrect, but I did not find anything that shows me a different file structure. Am I on the right track or is there something else wrong with this setting?
source share