[Qt-creator] Creator Can not locate Qt Headers

Michael Jackson imikejackson at gmail.com
Tue Nov 18 16:04:15 CET 2014


On Nov 17, 2014, at 10:59 AM, Nikolai Kosjar <nikolai.kosjar at theqtcompany.com> wrote:

>> On Nov 14, 2014, at 3:34 AM, Nikolai Kosjar <nikolai.kosjar at theqtcompany.com> wrote:
>>> ...
>>> Please check what the Code model gets as input from the Project
>>> (managers):
>>> 
>>> 1) Open a file with unresolved includes
>>> 2) Open Menu: Tools > C++ > Inspect C++ Code Model
>>> 3) There, switch to the "Project Parts" tab and the sub tab "Header
>>> Paths" - check that the includes are reasonable, especially that there
>>> is sth. like ${PATH_TO_QT_INSTALL}/5.4/gcc_64/include/QtCore 
>>> 
>> 
>> Most of the include directories for my project are missing.
> 
> This looks like a bug or un-implemented feature in the CMakeProject
> (manager).
> 
> Please file a bug report at https://bugreports.qt-project.org/ against
> the component "Project & Buildmanagemant".
> 
> Nikolai
> 

https://bugreports.qt-project.org/browse/QTCREATORBUG-13432

Attached some discussion on the bug and a first attempt at a patch to fist the problem. The fix worked on my system. Hopefully we can get some others to test it out.

At the lowest levels, QtCreator parsing out the .cbt files is a sub-optimal solution as the .cbt file does not really have all the information that QtCreator is needing. Some information must be inferred based on paths and directory naming.

I have inquired on the CMake list if CMake can produce just a plain XML file of the project structure or if this is something that might be implemented in the future. In the long term I think this would be the most useful solution.

Thanks to everyone for their insights (Andre) and thoughts.

Cheers
Mike Jackson




More information about the Qt-creator mailing list