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. Why does QPrinterInfo::availablePrinters return empty list on PC with printers?
Forum Updated to NodeBB v4.3 + New Features

Why does QPrinterInfo::availablePrinters return empty list on PC with printers?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 318 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.
  • SprezzaturaS Offline
    SprezzaturaS Offline
    Sprezzatura
    wrote on last edited by
    #1

    Both QPrinterInfo::availablePrinters() and QPrinterInfo::availablePrinterNames() return an empty list on Windows PCs that nevertheless show printers when displayed in the Control Panel ➔ Devices & Printers.

    The printers are not connected to the computer. I would at least expect Qt to display the "Microsoft Print to PDF". This is also failing on PCs with WiFi printer connections.

    Any suggestions on how to get a Printer dialog to display, that is populated with the same list of printers as a native app?

    1 Reply Last reply
    0
    • SprezzaturaS Offline
      SprezzaturaS Offline
      Sprezzatura
      wrote on last edited by
      #2

      The problem was caused by not knowing that I needed to install the following in my app folder:

      ..\printsupport\windowsprintersupport.dll
      

      Answered here: https://forum.qt.io/topic/39319/solved-qprinterinfo-availableprinters-don-t-list-available-printers

      https://forum.qt.io/post/197518

      1 Reply Last reply
      2
      • SprezzaturaS Sprezzatura referenced this topic on

      • Login

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