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. The dark side of .pro file

The dark side of .pro file

Scheduled Pinned Locked Moved Unsolved General and Desktop
19 Posts 5 Posters 2.0k Views 3 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.
  • SGaistS SGaist

    One thing that is strange is why are you calling qmake -project when trying to build one of the examples since they already have .pro files ?

    M Offline
    M Offline
    MMonty1960
    wrote on last edited by
    #7

    @SGaist It was just one of N trials I did to solve the problem

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #8

      Can you provide a link to that example ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      JKSHJ 1 Reply Last reply
      0
      • SGaistS SGaist

        Can you provide a link to that example ?

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #9

        @SGaist said in The dark side of .pro file:

        Can you provide a link to that example ?

        I believe it's https://doc.qt.io/qt-5/qtdatavisualization-surface-example.html. I just tested it with Qt 5.15.2 and the *.pro file works fine.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        SGaistS M 2 Replies Last reply
        0
        • JKSHJ JKSH

          @SGaist said in The dark side of .pro file:

          Can you provide a link to that example ?

          I believe it's https://doc.qt.io/qt-5/qtdatavisualization-surface-example.html. I just tested it with Qt 5.15.2 and the *.pro file works fine.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #10

          @JKSH I believe too. The thing with it is that it uses "../examples.pri" which is where the common "QT" configuration is done. So there might be something there with the building issue.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • JKSHJ JKSH

            @SGaist said in The dark side of .pro file:

            Can you provide a link to that example ?

            I believe it's https://doc.qt.io/qt-5/qtdatavisualization-surface-example.html. I just tested it with Qt 5.15.2 and the *.pro file works fine.

            M Offline
            M Offline
            MMonty1960
            wrote on last edited by
            #11

            @JKSH I am using Manjaro linux 64 bit xfce. When I select the "Surface example" a window pops-up asking is I want "copy and open" or "keep project and open". If I select "keep project and open", as next step I have to push "configure project" (I select Qt 5.10.1). Then the generated pro file is:
            android|ios|winrt {
            error( "This example is not supported for android, ios, or winrt." )
            }

            !include( ../examples.pri ) {
            error( "Couldn't find the examples.pri file!" )
            }

            SOURCES += main.cpp
            surfacegraph.cpp

            HEADERS += surfacegraph.h

            QT += widgets
            requires(qtConfig(combobox))

            RESOURCES += surface.qrc

            OTHER_FILES += doc/src/*
            doc/images/*

            Of course that is the end of the experience. The same happen in the other choice. Maybe there is some error in my linux distro.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #12

              So my idea was correct, you are missing the examples.pri file.

              Don't you have the warning shown when building the project ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MMonty1960
                wrote on last edited by
                #13

                I find the issue "/example.pri" only in the choice "copy and open". I solved by manually copying that file, but the pro file remained unchanged and one again the experience end

                JKSHJ 1 Reply Last reply
                0
                • M MMonty1960

                  I find the issue "/example.pri" only in the choice "copy and open". I solved by manually copying that file, but the pro file remained unchanged and one again the experience end

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #14

                  @MMonty1960 said in The dark side of .pro file:

                  but the pro file remained unchanged and one again the experience end

                  The pro file should remain unchanged since it is correct.

                  What do you mean "the experience end"? What happens when you use Qt Creator to build and run the project?

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  M 1 Reply Last reply
                  0
                  • JKSHJ JKSH

                    @MMonty1960 said in The dark side of .pro file:

                    but the pro file remained unchanged and one again the experience end

                    The pro file should remain unchanged since it is correct.

                    What do you mean "the experience end"? What happens when you use Qt Creator to build and run the project?

                    M Offline
                    M Offline
                    MMonty1960
                    wrote on last edited by
                    #15

                    @JKSH The pro file is not correct because is missing for QT+=datavisualization so compilation fails.
                    Now I know the solution, thus if I add manually that line the compilation runs correctly.
                    In any case I would like to thank both SGaist and JKSH because I learned a lot by your answers. Many thanks!!!!

                    JKSHJ 1 Reply Last reply
                    0
                    • Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #16

                      @MMonty1960 said in The dark side of .pro file:

                      The pro file is not correct because is missing for QT+=datavisualization so compilation fails.

                      As @SGaist already told you examples.pri contains more stuff. When you take a look into it you will notice a 'QT += datavisualization' line so the pro file is correct.

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      1 Reply Last reply
                      1
                      • M MMonty1960

                        @JKSH The pro file is not correct because is missing for QT+=datavisualization so compilation fails.
                        Now I know the solution, thus if I add manually that line the compilation runs correctly.
                        In any case I would like to thank both SGaist and JKSH because I learned a lot by your answers. Many thanks!!!!

                        JKSHJ Offline
                        JKSHJ Offline
                        JKSH
                        Moderators
                        wrote on last edited by
                        #17

                        @MMonty1960 said in The dark side of .pro file:

                        @JKSH The pro file is not correct because is missing for QT+=datavisualization so compilation fails.

                        The pro file is correct. You just need to make sure that examples.pri is in the folder above surfaces.pro so that QT += datavisualization is included via include(../examples.pri). You don't need to modify surfaces.pro.

                        But anyway, you have highlighted a weakness in the way examples are loaded so I opened a bug report: https://bugreports.qt.io/browse/QTCREATORBUG-25191

                        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                        M 1 Reply Last reply
                        1
                        • JKSHJ JKSH

                          @MMonty1960 said in The dark side of .pro file:

                          @JKSH The pro file is not correct because is missing for QT+=datavisualization so compilation fails.

                          The pro file is correct. You just need to make sure that examples.pri is in the folder above surfaces.pro so that QT += datavisualization is included via include(../examples.pri). You don't need to modify surfaces.pro.

                          But anyway, you have highlighted a weakness in the way examples are loaded so I opened a bug report: https://bugreports.qt.io/browse/QTCREATORBUG-25191

                          M Offline
                          M Offline
                          MMonty1960
                          wrote on last edited by
                          #18

                          @JKSH Of course I copied example.pri in the folder above surface.pro, but there is no effect on the pro file and compilation crashed. Maybe the reason is that the pro file is composed before I applied the correction and after that is not more refreshed. In any case I failed to compile and run the example.

                          JKSHJ 1 Reply Last reply
                          0
                          • M MMonty1960

                            @JKSH Of course I copied example.pri in the folder above surface.pro, but there is no effect on the pro file and compilation crashed. Maybe the reason is that the pro file is composed before I applied the correction and after that is not more refreshed. In any case I failed to compile and run the example.

                            JKSHJ Offline
                            JKSHJ Offline
                            JKSH
                            Moderators
                            wrote on last edited by
                            #19

                            @MMonty1960 said in The dark side of .pro file:

                            Maybe the reason is that the pro file is composed before I applied the correction and after that is not more refreshed.

                            Yes, you're right. You can force a refresh by clicking Build > Run qmake. That should let you compile and run the example.

                            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                            1 Reply Last reply
                            2

                            • Login

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