Can QPageSetupDialog "Format For:" printer be programmatically set?



  • I have a label printer which is not the default page printer. The system default printer is an inkjet page printer.

    I am trying to create a "Label Printer Setup" button which programmatically has the non-default label printer as the initially selected as the "Format For:" printer in the dialog.

    The following code is from one of various approaches which i tried that have not worked ...
    [code]
    QPrinter myLabeler = new QPrinter(myLabelerQPrinterInfo,
    QPrinter::HighResolution);
    QPageSetupDialog myLabelerSetupDialog( myLabeler );
    if (myLabelerSetupDialog.exec()) {
    ...
    }
    [/code]

    So far, the system default ink jet printer instead of the label printer has always shown as the initially selected "Format For:" printer.

    Can QPageSetupDialog "Format For:" printer be programmatically set for the dialog? If yes, then how?

    I'm currently developing this application on OS X 10.8.5 with Qt 5.1.1.



  • OK. ... then it looks like a bug.

    I reported the issue with test code and screen shot here:

    --> https://bugreports.qt-project.org/browse/QTBUG-34450



  • Did you ever resolve this? I am getting the same issue in 5.4.



  • Did you ever resolve this? I am getting the same issue in 5.4.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.