Unsolved Error Handling in QPrinter
-
Hi all,
i am working on a project that has to print to a local printer. I have implemented printing capability but what I am searching now is a way to handle potential printing errors. I know that there is printer.printerState() function and few flags that one can check but they are pretty useless.
Is there a way to check if printer is online or offline, is toner empty or low, is there a paper in a tray?
Tnx
-
@Zgembo said in Error Handling in QPrinter:
Is there a way to check if printer is online or offline, is toner empty or low, is there a paper in a tray?
As far as I know there is no support for this in Qt. You will need to use native APIs.
-
@jsulm OK. Can you point me to and example?
-
@Zgembo No, I don't have any example. What is the OS?
-
@jsulm Windows 10
-
@Zgembo Then you need to take a look at Windows API (win32). Maybe there are some libraries out there which simplify this.
-
@jsulm said in Error Handling in QPrinter:
@Zgembo Then you need to take a look at Windows API (win32). Maybe there are some libraries out there which simplify this.
OK, thank you.