如何在QT中获取driverName和网络打印机端口?

时间:2021-08-28 18:11:15

I am trying to get Network Printer Driver and Port Name in my QT application. How I can achieve this? I pass my configured printer name that gives the particular printer driver name and port.

我想在我的QT应用程序中获取网络打印机驱动程序和端口名称。我怎么能做到这一点?我传递配置的打印机名称,该名称提供特定的打印机驱动程序名称和端口

1 个解决方案

#1


0  

By calling QList<QPrinterInfo> availablePrinters() you can get all the available printers. In this list, check the return values of printerName() and location() of the printer that you're interested.

通过调用QList availablePrinters(),您可以获得所有可用的打印机。在此列表中,检查您感兴趣的打印机的printerName()和location()的返回值。

#1


0  

By calling QList<QPrinterInfo> availablePrinters() you can get all the available printers. In this list, check the return values of printerName() and location() of the printer that you're interested.

通过调用QList availablePrinters(),您可以获得所有可用的打印机。在此列表中,检查您感兴趣的打印机的printerName()和location()的返回值。