[SOLVED] Autocomplete stopped in Qt Creator using SCons
-
Do you still have a .pro file that describes your project, and which modules it is using?
-
Hi Andre,
A pro file is archived, yes, but its not used at present. Since its a SCons build, we're just using the make style:
*.files
*.includes
*.configI don't believe I can use a pro file too can I? Just to describe which modules - QtCore, QtGui, QtTest and QtNetwork in our case
-
QtCreator needs a build system it supports to know which modules are included, and of course which files are in the project. I think SCons is not one of the supported build sytems. AFAIK, only qmake, cmake and QBS (experimental) are supported.
That makes it hard to work with Creator effectively in this case.
-
Creator gets the include paths from the build system. -So did cmake detect Qt properly?- Which kind of project (and thus build system) are you using now? Does that detect Qt properly? If you are using a generic project: Did you set the relevant header paths and macros in the generic project configuration files?
-
Andre: Actually there is autotools support as well, but that plugin is still marked as experimental.
-
[quote author="Tobias Hunger" date="1360915527"]Andre: Actually there is autotools support as well, but that plugin is still marked as experimental.[/quote]
One learns something new every day :-)
(not that I think autotools is a viable solution for a build system...)
-
Tobias, what did you mean by this ?
Did you set the relevant header paths and macros in the generic project configuration files?
-
Did you set up the generic project with the header paths and macros? There are files that creator reads to extract that information from. Check the documentation on generic projects for the details, I don't remember them right now.
-
Ok so solution was very easy. just add the Qt Include dirs to the myproject.includes file, eg:
@C:/Qt/4.8.3/include/QtCore
C:/Qt/4.8.3/include/QtGui
C:/Qt/4.8.3/include/QtTest
@It all works! Qt types recognised and autocomplete restored. I was helped by this old page: http://cisharp.blogspot.co.uk/2009/08/qt-creator-tipps.html
The process is also described in the docs as Tobias says, which I had read but misunderstood:
http://doc.qt.digia.com/qtcreator-snapshot/creator-project-generic.html#specifying-include-paths
Thanks
-
Still seems daft having to tell Qt Creator about the Qt installation in this way.
-
sipickles: How is Creator supposed to extract that kind of information from a build system it does not understand at all? You could have configure that system to use something completely different from what you put into your kits. You may or may not use Qt at all in your project.