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. QPrinter problem QT 5.9.2 and 5.8
Forum Updated to NodeBB v4.3 + New Features

QPrinter problem QT 5.9.2 and 5.8

Scheduled Pinned Locked Moved Solved General and Desktop
24 Posts 5 Posters 10.4k 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.
  • K Krasnoiark

    I went on the QT website, downloaded the open source installer.
    Downloaded and Installed QT 5.9.2 MinGW 5.3.0 32 bit. And I checked all the tools.

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

    @Krasnoiark
    That sounds pretty ok.

    Can you try this default project and tell if it also gives errors?
    https://www.dropbox.com/s/wxcdigflnwbeq4d/myprinter.zip?dl=0

    Also, you are targeting Desktop, correct ?
    Its not bare metal project or something like that?

    1 Reply Last reply
    0
    • K Krasnoiark

      I went on the QT website, downloaded the open source installer.
      Downloaded and Installed QT 5.9.2 MinGW 5.3.0 32 bit. And I checked all the tools.

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

      @Krasnoiark Most probably not the reason for the problem, but why do you add core and gui twice to QT?

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

      1 Reply Last reply
      1
      • K Offline
        K Offline
        Krasnoiark
        wrote on last edited by
        #11

        It compiles and there is no errors

        mrjjM 1 Reply Last reply
        0
        • K Krasnoiark

          It compiles and there is no errors

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

          @Krasnoiark
          So i think your .pro or kit selection might be messed up.

          This is a desktop app, correct?

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Krasnoiark
            wrote on last edited by
            #13

            0_1508167382383_Capture d’écran (35).png

            Yes, this is a Desktop project and the project is a QTWidget project insite 2 other QT Sub-projects.

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

              Hmm
              It does look fine with the kit.

              It must be something with the pro file then

              Since the test project worked and I assume you compiled that
              exactly like this.

              O 1 Reply Last reply
              0
              • K Offline
                K Offline
                Krasnoiark
                wrote on last edited by
                #15

                https://drive.google.com/file/d/0B3foRMnUz_jLM1FPTVZZb1U2LUE/view?usp=sharing

                This is my .pro file

                jsulmJ 1 Reply Last reply
                0
                • mrjjM mrjj

                  Hmm
                  It does look fine with the kit.

                  It must be something with the pro file then

                  Since the test project worked and I assume you compiled that
                  exactly like this.

                  O Offline
                  O Offline
                  ofmrew
                  wrote on last edited by
                  #16

                  @mrjj I believe that once in the past you told me to try deleting the build folder. It has solved many of my problems, is it worth a try?

                  mrjjM 1 Reply Last reply
                  1
                  • K Krasnoiark

                    https://drive.google.com/file/d/0B3foRMnUz_jLM1FPTVZZb1U2LUE/view?usp=sharing

                    This is my .pro file

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

                    @Krasnoiark You still add gui twice.
                    Do you have other Qt installations on your machine?

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

                    K 1 Reply Last reply
                    2
                    • O ofmrew

                      @mrjj I believe that once in the past you told me to try deleting the build folder. It has solved many of my problems, is it worth a try?

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

                      @ofmrew
                      its always worth a try :) Especially when stuff are strange. Good call.

                      1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @Krasnoiark You still add gui twice.
                        Do you have other Qt installations on your machine?

                        K Offline
                        K Offline
                        Krasnoiark
                        wrote on last edited by
                        #19

                        @ofmrew No I don't. All I have is QT 5.9.2 MinGW and the tools
                        .0_1508168815473_Capture d’écran (36).png

                        I have tryed recompiling from scratch, it did not work.

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

                          It seems not to be the pro file as
                          it is pretty basic and it could compile my project too.

                          And QPrinter is included in the installation as a default project works.

                          My best bet is that the
                          $$files(.cpp)
                          $$files(classes/
                          .cpp)
                          $$files(gui/*.cpp) \

                          find something we dont expect and include.

                          K 1 Reply Last reply
                          0
                          • mrjjM mrjj

                            It seems not to be the pro file as
                            it is pretty basic and it could compile my project too.

                            And QPrinter is included in the installation as a default project works.

                            My best bet is that the
                            $$files(.cpp)
                            $$files(classes/
                            .cpp)
                            $$files(gui/*.cpp) \

                            find something we dont expect and include.

                            K Offline
                            K Offline
                            Krasnoiark
                            wrote on last edited by
                            #21

                            @mrjj I have tryed retyping all the pro file with all the files included but no luck.
                            Do you think it could be about the multiple projects ? I have my software project inside a sub-project inside an other sub-project. (My team needed multiple projects in order to have the testing project and the software and a 2nd project because our project has multiple softwares ).
                            In the sub project I only include the projects it gathers. Should I include qprintsupport inside that pro file ?

                            mrjjM 1 Reply Last reply
                            0
                            • K Krasnoiark

                              @mrjj I have tryed retyping all the pro file with all the files included but no luck.
                              Do you think it could be about the multiple projects ? I have my software project inside a sub-project inside an other sub-project. (My team needed multiple projects in order to have the testing project and the software and a 2nd project because our project has multiple softwares ).
                              In the sub project I only include the projects it gathers. Should I include qprintsupport inside that pro file ?

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

                              If the sub projects also have .pro file
                              and you get the linker error in them/related to those files
                              then yes, you need
                              QT+=printsupport there also to link the module to that set of .o files.

                              1 Reply Last reply
                              1
                              • K Offline
                                K Offline
                                Krasnoiark
                                wrote on last edited by
                                #23

                                OK THAT WAS IT ! I had to include inside the pro files the QT += printsupport.
                                Thank you for helping me and sorry for taking your time. It was pretty stupid of me not to check that.
                                Anyway, thank you.

                                mrjjM 1 Reply Last reply
                                0
                                • K Krasnoiark

                                  OK THAT WAS IT ! I had to include inside the pro files the QT += printsupport.
                                  Thank you for helping me and sorry for taking your time. It was pretty stupid of me not to check that.
                                  Anyway, thank you.

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

                                  @Krasnoiark
                                  No problem at all.
                                  I also learn something :)

                                  I had no idea you could do

                                  $$files(*.cpp) 
                                  

                                  thx :)

                                  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