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. No QPrinter::PostScriptFormat in qt5
Forum Updated to NodeBB v4.3 + New Features

No QPrinter::PostScriptFormat in qt5

Scheduled Pinned Locked Moved General and Desktop
11 Posts 6 Posters 8.7k Views 2 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.
  • A Offline
    A Offline
    Anticross
    wrote on last edited by
    #1

    I tried to migrate from qt 4.8.4 and get the folloving error:
    bq. mat' : is not a member of 'QPrinter'
    19> C:\Qt\Qt5.0.1\5.0.1\msvc2010\include\QtPrintSupport\qprinter.h(66) : see declaration of 'QPrinter'
    19>src\qwt_plot_renderer.cpp(250): error C2065: 'PostScriptFormat' : undeclared identifier

    1 Reply Last reply
    1
    • A Offline
      A Offline
      Anticross
      wrote on last edited by
      #2

      Also I get the error 'WA_PaintOutsidePaintEvent' : is not a member of 'Qt'

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DerManu
        wrote on last edited by
        #3

        I have this problem now, too. Porting to Qt5 is a real pain, they have done incredible things.

        Look at this:
        http://qt.gitorious.org/qt/qtbase/commit/34f712e79e97b757b4426e1ffa09e065c9e379a1

        He just removes the postscript support, a feature people depend on, with the comment

        bq. I really wanted to do this since many years already! :)

        And in the documentation not the slightest hint of this. Infact the "Qt5 documentation for print support":http://qt-project.org/doc/qt-5.0/qtprintsupport/qtprintsupport-index.html even still claims support for PostScript:

        bq. Qt's printing system also enables PostScript and PDF files to be generated, providing the foundation for basic report generation facilities.

        Well, basic report generation has just been cut in half by Qt5.

        Qt is falling apart and everybody's watching.
        Hey Lars, now that I think of it, Why don't you ditch QPrinter and print support altogether? Who prints things nowaways anyways, it's all on the little tablets and smartphones, right?!

        1 Reply Last reply
        1
        • C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #4

          @DerManu: Nobody is holding a gun to your head forcing you to port a working Qt4 application to Qt5. The process is clearly causing you aggravation and whining about it incessantly will not help. Either stick with Qt4, or propose reinstating the Postscript support in Qt5 by putting up the patch and agreeing to maintain it.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DerManu
            wrote on last edited by
            #5

            [quote author="ChrisW67" date="1367967448"]whining about it incessantly will not help[/quote] While I agree that there was some whine with that cheese, I can't see how two threads (this one and "this":http://qt-project.org/forums/viewthread/27510/) which do contain constructive discussion for the greater part can be described as incessant whining. If you feel annoyed by my occasional dry remark, I'd like to apologize, and suggest you skip them ;).

            [quote author="ChrisW67" date="1367967448"]Nobody is holding a gun to your head forcing you to port a working Qt4 application to Qt5.[/quote]As you say, this is true for applications. Unfortunately it is not true for library developers like me, who have clients that want Qt4 and clients that want Qt5 support. A very high priority is giving them a good user experience using the library, instead of making them jump through hoops. And just dropping -- in some cases essential -- feature sets like PostScript support out of thin air is pretty steep (without even deprecating it beforehand!).

            [quote author="ChrisW67" date="1367967448"]propose reinstating the Postscript support in Qt5 by putting up the patch and agreeing to maintain it.[/quote]I see that this is often the argument in open source software, which is great in principle. But lets be realistic. I use Qt as a framework to get my work done, I don't have the time to take on major maintenance work in that framework itself, if I want to keep developing my own library.

            1 Reply Last reply
            1
            • C Offline
              C Offline
              ChrisW67
              wrote on last edited by
              #6

              I cannot recall anything more than a brief mention (that I cannot locate) about PostScript removal before Qt5 release (not like the longer discussion that surrounded QWeakPointer). It will be interesting to see what comes of a paying customer request to Digia about removal of PS. Has someone lodged a bug report over the documentation?

              DerManu, my apologies... a bit harsh. Can I put it down to a bad day at the office?
              If your clients want to use Qt5 they have accepted the capabilities of Qt5. Are they asking that your library does not do things that Qt5 cannot do, or is this more a case of wanting to maintain the same capabilities on your part? I appreciate that in scientific publishing circles PostScript is often preferred (as a LaTeX input for example) but a pdf2ps is often a reasonable approach.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Md Asad Rub
                wrote on last edited by
                #7

                Hello @DerManu ,
                Did you find any solution regarding postscript generation in QT5?
                Regards,
                Asad.

                mrjjM 1 Reply Last reply
                0
                • M Md Asad Rub

                  Hello @DerManu ,
                  Did you find any solution regarding postscript generation in QT5?
                  Regards,
                  Asad.

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Md-Asad-Rub
                  Hi
                  You can install a post script printer and set it to print to file.
                  you get a ps file from that.
                  Qt can print to pdf, but i assume you need PS ?

                  M 1 Reply Last reply
                  1
                  • mrjjM mrjj

                    @Md-Asad-Rub
                    Hi
                    You can install a post script printer and set it to print to file.
                    you get a ps file from that.
                    Qt can print to pdf, but i assume you need PS ?

                    M Offline
                    M Offline
                    Md Asad Rub
                    wrote on last edited by
                    #9

                    Hi @mrjj ,
                    Actually i have a widget that the user want to save as ps, pdf, svg , Image or print to printer.
                    I am able to do all of these things apart from saving the widget as ps file in qt5. I can do it in qt4 but i want to know how can i do it in qt5.
                    Thanks.
                    Asad.

                    jsulmJ 1 Reply Last reply
                    0
                    • M Md Asad Rub

                      Hi @mrjj ,
                      Actually i have a widget that the user want to save as ps, pdf, svg , Image or print to printer.
                      I am able to do all of these things apart from saving the widget as ps file in qt5. I can do it in qt4 but i want to know how can i do it in qt5.
                      Thanks.
                      Asad.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Md-Asad-Rub See https://stackoverflow.com/questions/45467942/how-can-i-print-a-qwidget-in-qt

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

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

                        Hi
                        As far as i know, PS output is no longer directly available in Qt5.

                        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