Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Can't find/access any printer when running in 32bit system



  • hi, i am successfully printing on my 64 bits system, but somehow when I use my executable on a 32 system, the painter just fails.

    The same program works on 64 and not on 32, printer is the same, QDebug shows that the Qpainter fails in the begin() part, when i use it's constructor.

    here is what I do :

    i have a private printer in my header naled "mPrinter"

    QString printerName = settings.value(REG_PRINTERNAME).toString();
    qDebug() << QString("printer name : ") << printerName // printerName is valid in debug
    mPrinter.setColorMode(QPrinter::GrayScale);
    mPrinter.setResolution(203);
    mPrinter.setPageMargins(5,5,5,5, QPrinter::Millimeter);
    mPrinter.setOrientation(QPrinter::Portrait);
    QPainter painter(&mPrinter); // here is where it fails in 32 and not in 64

    I also can"t find the printer when running a loop on pInfo.availablePrinters() (i find them on 64 bits but not in 32 bits system)

    The 32 bit system is altho able to print with the printer which name is used, an drivers are up do date.

    Any idea ?


  • Moderators

    @SimonSLG
    make sure the printsupport plugins are distributed correctly and are loaded by your application.
    This can be done by setting the env variable QT_DEBUG_PLUGINS to a non-zero value and check the console output.



  • Thank you, I will try and give feedback


Log in to reply