Qt
  1. Qt
  2. QTBUG-28822

QPrintDialog don't work in windows

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Not Evaluated Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.0.0, 5.0.1
    • Fix Version/s: None
    • Component/s: GUI: Printing
    • Labels:
      None
    • Environment:

      Don't working on Windows 8 Pro 64Bit with Qt-5.0.1 which is compiled shared with VS2010 under Win7 Pro

      Description

      QPrintDialog don't work in windows but it work in linux

      For me, it works on Mac and Linux

      1. qtbug28822.tar
        10 kB
        Friedemann Kleint
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        Andy Han added a comment -

        The same message - QPrintDialog: Cannot be used on non-native printers shows up if the hardware printer is not installed on Mac and Windows but Linux is fine now.

        Show
        Andy Han added a comment - The same message - QPrintDialog: Cannot be used on non-native printers shows up if the hardware printer is not installed on Mac and Windows but Linux is fine now.
        Hide
        Andy Han added a comment - - edited

        Please ignore the comments above as I complied the QT lib statically so will have another try then advise you guys.

        Show
        Andy Han added a comment - - edited Please ignore the comments above as I complied the QT lib statically so will have another try then advise you guys.
        Hide
        Andy Han added a comment -

        Have added QTPLUGIN += cocoaprintersupport into .pro file and inserted Q_IMPORT_PLUGIN(QCocoaPrinterSupportPlugin) into the source code then rebuilt whole project but it still throws the exception as below - QPrintDialog: Cannot be used on non-native printers on Mac.

        Show
        Andy Han added a comment - Have added QTPLUGIN += cocoaprintersupport into .pro file and inserted Q_IMPORT_PLUGIN(QCocoaPrinterSupportPlugin) into the source code then rebuilt whole project but it still throws the exception as below - QPrintDialog: Cannot be used on non-native printers on Mac.
        Hide
        Andy Han added a comment -

        The issue resolved finally.

        1. The Output format for QPrinter object should be set to Native format before creating instance for QPrintDialog. It can avoid to show the message as above.

        2. The Print Support plugin should be set in the .pro file and also imported with Q_IMPORT_PLUGIN() function if it is static build.

        Show
        Andy Han added a comment - The issue resolved finally. 1. The Output format for QPrinter object should be set to Native format before creating instance for QPrintDialog. It can avoid to show the message as above. 2. The Print Support plugin should be set in the .pro file and also imported with Q_IMPORT_PLUGIN() function if it is static build.
        Hide
        Andy Han added a comment - - edited

        The solution was actually a bug which has been fixed in QT 5.2.1.

        I can understand completely the output format is more important for the printer support plugin in order to separate the PDF exporting from document printing, but we still should think about the native OS PDF export which has been integrated into Printer Dialog.

        Show
        Andy Han added a comment - - edited The solution was actually a bug which has been fixed in QT 5.2.1. I can understand completely the output format is more important for the printer support plugin in order to separate the PDF exporting from document printing, but we still should think about the native OS PDF export which has been integrated into Printer Dialog.

          People

          • Assignee:
            Friedemann Kleint
            Reporter:
            malek khlif
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes