Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QCoreApplication>
- #include <QtPrintSupport/QPrinterInfo>
- #include <QThread>
- #include <QDebug>
- int main(int argc, char *argv[])
- {
- QCoreApplication a(argc, argv);
- while (1) {
- QThread::msleep(3000);
- qDebug()<<"List of printers";
- QList<QPrinterInfo> printerList=QPrinterInfo::availablePrinters();
- foreach (QPrinterInfo printerInfo, printerList) {
- qDebug()<<printerInfo.printerName();
- }
- }
- return a.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement