[Qt-creator] Problem in Qt Creator 3.0.1
steve at blighty.com
Thu Feb 13 21:18:38 CET 2014
On Feb 13, 2014, at 11:01 AM, VStevenP <vstevenpavao at yahoo.com> wrote:
> I have a class that I wrote which inherits from QQuickItem.
> In Qt Creator 3.0.1, it doesn't recognize my #include <QQuickItem> anymore. It underlines this code in a gold-colored squiggly, and results in "No such file or directory or file." when I hover my cursor over it.
> Also, it underlines the following in red,as if it doesn't recognize it:
> What is going on with this basic behavior being broken?
> I am able to use my custom type in my QML via qmlRegisterType(), as usual. But the fact that it's not recognized by QtCreator has me worried that there might be a bigger problem. This is basic stuff.
Creator can be pickier about .pro syntax than qmake, which can lead to the syntax highlighter not using the right include path, so not finding include files (which in turn, can lead to it flagging syntax errors due to it not having included the include file). So double check that your .pro syntax is valid.
There’s also an environment variable you can set that’ll supposedly make Creator give more verbose warnings as it parses things - QTCREATOR_DUMP_FILENAME_WHILE_PARSING. Once that’s set, run Creator in a way that you can see it’s console output and look for the “Parsing file” lines, to check that it’s finding the include files as you expect - a bad INCLUDEPATH, combined with #include “foo/bar” seems to be one problem people have seen.
More information about the Qt-creator