QtCreator 3.0.0 not showing files from included *.PRI files
-
Tried to install Qt5.2 and try it with an own project currently developed with Qt 4.8, but in the Project View the included files are not shown for any included *.PRI file.
The files are however accesible.The project was copied from a machine running 4.8, without the *.PRO.USER file.
It is working on the 4.8.
Primarily, the project is developed for Windows, on Windows, with MinGW.By now I've checked:
-
checked the directry structure is the same
the disk drive is different, but all the paths are relative -
the same project copied on Linux compiles normally (in Qt4.8)
Tried to search the web, but can't find a similar issue. Probably, doing something wrong, but can't notice it.
Any idea where to continue? -
-
.pri includes work perfectly for me in Qt 5.2 on all desktop platforms (Linux, Windows and Mac) with Qt Creator 3.0.
Are you getting any errors or such? Are your kits properly set up in Qt Creator settings?
-
Have just 1 kit: Desktop Qt 5.2.0 MinGW 32bit
I've installed creator & mingw from a single installation, no separate installs or manual settings -
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.
-
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 #includesAlmost all *.PRI are like
@INCLUDEPATH += $$PWD
DEPENDPATH += $$PWDHEADERS += 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? -
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_
@ -
I have actually checked out from a repository, where by default are not stored specific files like *.pro.user and build folders at all
-
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/).
-
Will give it a try later on.
Some work still waits to be finished. -
I've solved the situation.
But in a way that I don't like.See below the changed *.PRI file
@INCLUDEPATH += $$PWD
DEPENDPATH += $$PWDHEADERS += $$PWD/printer_basic.h
SOURCES += $$PWD/printer_basic.cpp@Is this a bug or new approach?
-
Sierdzio, thanks for the hint, but it did not helped.
-
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?
-
[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.
-
[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.
-
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.3Both, Qt and Qt Creator, coming from the Ubuntu repository.
-
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.
-
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.