[Qt-creator] registering external libraries

Daniel Teske daniel.teske at nokia.com
Mon Mar 16 11:27:41 CET 2009


On Monday 16 March 2009 02:56:02 ext Richard Baron Penman wrote:
> hello,
>
> Until now I have been developing in Visual Studio. I tried opening and
> building my project in Qt Creator and it all worked - fantastic! The only
> downside to Qt Creator for me is that non-Qt libraries don't seem to be
> well integrated into the editor. For example when I include a non-Qt header
> file Qt Creator underlines it in yellow because "No such file or
> directory". The code completion also only works for the native Qt
> libraries.
>
> So, is it possible to register an external C++ library so that Qt Creator
> can detect the header files and perform code completion like in VS?

You do that by adding a INCLUDEPATH[1] variable to your pro file. (You also 
might need to set the LIBS variable.) This tells the qmake and our code 
completion where to find the headers. 

daniel

[1] http://doc.trolltech.com/4.5/qmake-variable-reference.html#includepath



More information about the Qt-creator-old mailing list