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. Quering printer for status

Quering printer for status

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 749 Views 1 Watching
  • 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

    Is it possible to query QPrinter object for printer status? I need to know informations like is printer offline, is toner low or empty and does it have any paper?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      As far as i know, such info is not available with QPrinter.
      For Windows, you can use native API.
      https://support.microsoft.com/en-us/help/160129/how-to-get-the-status-of-a-printer-and-a-print-job

      1 Reply Last reply
      2
      • ZgemboZ Offline
        ZgemboZ Offline
        Zgembo
        wrote on last edited by
        #3

        I have found this also but I am not quite sure how to use this https://stackoverflow.com/questions/40043507/qt-5-8-windows-printer-api-invalid-handle-error

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Well its also native windows API.
          To use it, you should look up the function calls
          https://docs.microsoft.com/en-us/windows/desktop/printdocs/getdefaultprinter
          there you can see what DLL to link to
          alt text
          and which header file.

          1 Reply Last reply
          3

          • Login

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