Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator 3.0.0 not showing files from included *.PRI files
Forum Updated to NodeBB v4.3 + New Features

QtCreator 3.0.0 not showing files from included *.PRI files

Scheduled Pinned Locked Moved Qt Creator and other tools
17 Posts 4 Posters 7.5k Views 1 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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #4

    I did just that, too, earlier today (I normally work on Linux), but it works flawlessly. Maybe there is something special about your code? Qt 4 and Qt 5 are not, after all, source compatible with one another.

    (Z(:^

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gkavrecic
      wrote on last edited by
      #5

      I expected that.
      Remember, I did it with (probably) 5.0 and had no problems.
      Except the known requirements around "widgets" in *.PRO and changes related to #includes

      Almost all *.PRI are like
      @INCLUDEPATH += $$PWD
      DEPENDPATH += $$PWD

      HEADERS += printer_basic.h
      SOURCES += printer_basic.cpp@

      I include them in *.PRO as
      @include(../../QtCommon/printers/printer_basic.pri)@

      and the files are there.

      I didn't noticed any errors.
      I don't see a reason but anyway: it might be related to 64bit Windows?

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #6

        I don't think so... I was using a 64 bit Win 7 for my test. The code you've shown looks correct, I don't know why it is not working for you.

        A shot in the dark: since you have copied the code and removed .pro.user, maybe other build-related leftovers are cluttering your setup. Try removing all of those:
        @
        qmake.cache
        Makefile
        ui_.h
        moc_

        @

        (Z(:^

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gkavrecic
          wrote on last edited by
          #7

          I have actually checked out from a repository, where by default are not stored specific files like *.pro.user and build folders at all

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #8

            OK good, I secretly hoped you did that :) I really don't know why you are facing this problem, it should work.

            See if you can reproduce it also with Qt 5.2.1 (newest snapshot available "here":http://download.qt-project.org/snapshots/qt/5.2/5.2.1/2014-02-02_42/).

            (Z(:^

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gkavrecic
              wrote on last edited by
              #9

              Will give it a try later on.
              Some work still waits to be finished.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gkavrecic
                wrote on last edited by
                #10

                I've solved the situation.
                But in a way that I don't like.

                See below the changed *.PRI file
                @INCLUDEPATH += $$PWD
                DEPENDPATH += $$PWD

                HEADERS += $$PWD/printer_basic.h
                SOURCES += $$PWD/printer_basic.cpp@

                Is this a bug or new approach?

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  gkavrecic
                  wrote on last edited by
                  #11

                  Sierdzio, thanks for the hint, but it did not helped.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    gkavrecic
                    wrote on last edited by
                    #12

                    Tried the latest QtCreator 3.0.1, but the behavior persists.
                    As of the documentation the header/source files are searched relatively to the *.PRI's folder. Isn't it?

                    Is only me having this issue?

                    1 Reply Last reply
                    0
                    • sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #13

                      [quote author="gkavrecic" date="1392622037"]As of the documentation the header/source files are searched relatively to the *.PRI's folder. Isn't it?[/quote]

                      Yes, that is correct.

                      [quote author="gkavrecic" date="1392622037"]Is only me having this issue?[/quote]

                      Seems so. If you want to check on another project, feel free to download my Spdr: "link":https://github.com/sierdzio/spdr. I use the same technique you do ("link":https://github.com/sierdzio/spdr/blob/master/libraryIncludes.pri), so it might help us verify what is wrong. If you decide to try it, please don't use shadow building option from Qt Creator.

                      (Z(:^

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        gkavrecic
                        wrote on last edited by
                        #14

                        [quote author="sierdzio" date="1392623239"] I use the same technique you do ("link":https://github.com/sierdzio/spdr/blob/master/libraryIncludes.pri), so it might help us verify what is wrong. [/quote]

                        You used:
                        @INCLUDEPATH += $$PWD/libspdr
                        DEPENDPATH += $$PWD/libspdr@

                        That works for me. But I consider it a workaround. I would like to keep the 'old' way:
                        @INCLUDEPATH += libspdr
                        DEPENDPATH += libspdr@

                        Which is without the $$PWD in front. I consider it more readable and more logical.

                        This is also why I've asked if this is a new approach in 5.2.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          Synapse
                          wrote on last edited by
                          #15

                          Same issue here.

                          In my .pri file if I write:
                          @
                          INCLUDEPATH += $$PWD
                          DEPENDPATH += $$PWD
                          HEADERS += foo.h
                          SOURCES += foo.cpp
                          @
                          I don't see the files foo.h and foo.cpp in the Project TreeView.

                          Instead, with:
                          @
                          INCLUDEPATH += $$PWD
                          DEPENDPATH += $$PWD
                          HEADERS += $$PWD/foo.h
                          SOURCES += $$PWD/foo.cpp
                          @
                          everything works as expected...

                          btw, in both cases Qt Creator is able to compile.

                          I'm using:
                          Ubuntu Desktop 14.04 - 64bit
                          Qt Creator 3.0.1 (Based on Qt 5.2.1 (GCC 4.8.2, 64 bit))
                          Qt 4.8.3

                          Both, Qt and Qt Creator, coming from the Ubuntu repository.

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            alexandros
                            wrote on last edited by
                            #16

                            Bump!

                            Same problem here!

                            Project structure:
                            project.pro (main pro file)
                            tools.pri (in tools subfolder)
                            gui.pri (in gui subfolder)

                            project.pro ( http://paste.ubuntu.com/9279754/ )
                            tools.pri ( http://paste.ubuntu.com/9279756/ )
                            gui.pri ( http://paste.ubuntu.com/9279762/ )

                            All the files specified inside the .pri files are inside the respective folders. Only with the $$PWD prefix the files are shown inside QtCreator (so in the above pasted files, only the gui/about.h file is shown, screenshot: http://i.imgur.com/V6fnGwL.png ).

                            An interesting note: The invisible files can be accessed using the Ctrl+Click technique when viewing the .pri file from inside the QtCreator, so something is fishy.

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              alexandros
                              wrote on last edited by
                              #17

                              Bump!

                              Same problem here!

                              Project structure:
                              project.pro (main pro file)
                              tools.pri (in tools subfolder)
                              gui.pri (in gui subfolder)

                              project.pro ( http://paste.ubuntu.com/9279754/ )
                              tools.pri ( http://paste.ubuntu.com/9279756/ )
                              gui.pri ( http://paste.ubuntu.com/9279762/ )

                              All the files specified inside the .pri files are inside the respective folders. Only with the $$PWD prefix the files are shown inside QtCreator (so in the above pasted files, only the gui/about.h file is shown, screenshot: http://i.imgur.com/V6fnGwL.png ).

                              An interesting note: The invisible files can be accessed using the Ctrl+Click technique when viewing the .pri file from inside the QtCreator, so something is fishy.

                              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