Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error Handling in QPrinter

Error Handling in QPrinter

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 812 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ZgemboZ Offline
    ZgemboZ Offline
    Zgembo
    wrote on last edited by
    #1

    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

    jsulmJ 1 Reply Last reply
    0
    • ZgemboZ Zgembo

      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

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      ZgemboZ 1 Reply Last reply
      1
      • jsulmJ jsulm

        @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.

        ZgemboZ Offline
        ZgemboZ Offline
        Zgembo
        wrote on last edited by
        #3

        @jsulm OK. Can you point me to and example?

        jsulmJ 1 Reply Last reply
        0
        • ZgemboZ Zgembo

          @jsulm OK. Can you point me to and example?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Zgembo No, I don't have any example. What is the OS?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          ZgemboZ 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Zgembo No, I don't have any example. What is the OS?

            ZgemboZ Offline
            ZgemboZ Offline
            Zgembo
            wrote on last edited by
            #5

            @jsulm Windows 10

            jsulmJ 1 Reply Last reply
            0
            • ZgemboZ Zgembo

              @jsulm Windows 10

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Zgembo Then you need to take a look at Windows API (win32). Maybe there are some libraries out there which simplify this.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              ZgemboZ 1 Reply Last reply
              1
              • jsulmJ jsulm

                @Zgembo Then you need to take a look at Windows API (win32). Maybe there are some libraries out there which simplify this.

                ZgemboZ Offline
                ZgemboZ Offline
                Zgembo
                wrote on last edited by
                #7

                @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.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved