Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77339

QPrinterInfo / QPrintDialog inconsistent name for shared network printer

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 4.8.7, 5.12.4
    • GUI: Printing
    • None
    • Windows

    Description

      I am not sure whether this is really a bug, or to be discussed.

      On Windows 7. Having a system with 2 PC's. PC-1 and PC-2.

      PC-1 has configured a printer named MyPrinter.

      This printer is shared and used on PC-2.

      On PC-2, using QPrintDialog I see MyPrinter in the Select Printer list. However calling QPrinter::printerName() on the selected printer will give me \\PC-1\MyPrinter

      On PC-2, using QPrinterInfo::availablePrinters() with QPrinterInfo:printerName() I get \\PC-1\MyPrinter.

      My use case is that I have to store the printer name in the database, another part of the application not written in Qt will then read and handle it. So my work around is to use MSDN EnumPrinters() with level 2 where I get pPrinterName (the one used in Qt) and pShareName.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            johnlayt John Layt
            sbielmann Stephan Bielmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes