Hello,
The QPrinter class does not show my printer. Instead, it says “Print to file (PDF)” instead of the printername.
Also, I can not change/select a printer.
I use the following code:
QPrinter print(QPrinter::HighResolution);
print.setOutputFormat(QPrinter::NativeFormat);
print.setPageSize(QPrinter::A4);
print.setOrientation(QPrinter::Landscape);
print.setCreator(PROGRAM_NAME);
QPrintDialog printerdialog(&print, this);
printerdialog.setWindowTitle("Print");
if(printerdialog.exec()==QDialog::Accepted)
{
etc.
I’m using openSUSE 12.2 with KDE. CUPS is installed, also the development files for CUPS.
I configured Qt with the option “-cups”. The output of ./configure stated that CUPS is enabled.
Cups management on my pc works. Printing with other applications (Kate, LinbreOffice, Gimp) works fine.
Any idea’s?
↧