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. Detecting if printer is ready (connected and supplied)
Forum Update on Monday, May 27th 2025

Detecting if printer is ready (connected and supplied)

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 268 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.
  • B Offline
    B Offline
    Blogie
    wrote on last edited by
    #1

    Hello !

    I want to know if a specific printer is connected to my computer (Windows).

    I already read this topic :
    [https://forum.qt.io/topic/14320/detecting-a-printer-connection](link url)

    But QPrinterInfo::state() sends me "Idle" even if the printer is not supplied and the "printers and scanners" section in windows tells me it is offline.

    Windows can tell if the printer is online or offline => I want to know that, and QPrinterInfo::state() doesn't tell me that.

    Do you know how to do that ?

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      printers and their features are too varied to provide a common API that is realiable. I mean there are like 12 different common networking protocols that are used to forward print jobs, and each printer tends to have its own "language", although a few are more common than others.

      1 Reply Last reply
      1
      • B Offline
        B Offline
        Blogie
        wrote on last edited by
        #3

        OK, thank you Kent,
        If I understand it well, if it would have been possible to know if my printer is online or offline, QPrinterInfo::state() would have told me that. But my printer may be too specific (it's a sticker printer ZEBRA), that's why QPrinterInfo::state() can't tell the real state of the printer.
        Is that correct ?

        I will deal with it differently. Thanks again !

        JonBJ 1 Reply Last reply
        0
        • B Blogie

          OK, thank you Kent,
          If I understand it well, if it would have been possible to know if my printer is online or offline, QPrinterInfo::state() would have told me that. But my printer may be too specific (it's a sticker printer ZEBRA), that's why QPrinterInfo::state() can't tell the real state of the printer.
          Is that correct ?

          I will deal with it differently. Thanks again !

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Blogie
          We are saying it's not something Qt knows about. If there are Windows-specific libraries/calls which can detect "printer connection" --- as there probably are --- you can use those instead from your Qt/C++ program if you want that level of information.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Blogie
            wrote on last edited by
            #5

            OK thanks,
            I'll deal with it another way,

            Thanks again !

            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