Running Qt under Windows and for some reason it can't find the printers (there are 7 including both network and usb printers).
Here's the relevant code:
Qt Code:
QT += sql \ printsupport \ serialport \ xml \ network \ widgets from mainwindow.h #include <QPrinter> #include <QPrintDialog> #include <QPrinterInfo> from mainwindow.cpp qDebug() << "len = " << plist.length(); // len comes back zero QPrinter printer; printer.setPrinterName("DYMO LabelWriter 450"); qDebug() << "printer valid? " << printer.isValid(); // comes back falseTo copy to clipboard, switch view to plain text mode
I have another application that uses the same code and it reports 7 printers and prints to the Dymo just fine.
Any idea what I am missing here?
Bookmarks