Important: Please read the Qt Code of Conduct -

Tons of errors after reinstalling Qt-Creator Clang Code Model

  • Hi

    I am dogged by bad luck after messing with Qt-Creator reinstalls. My current
    project just worked fine and I had no errors. After reinstalling and reconfiguring my kits to crosscompile for RaspberryPi, I get a LOAD of errors in the same project, but if I BUILD the project I get NOT ONE error.
    In the editor window I get those errors indicated by a red O cirlce.
    Even in the main.cpp I get now an error:

    main.cpp:6:5: error: cannot initialize object parameter of type 'QWidget' with an expression of type 'MainWindow'


    And then this continues in my mainwindow.cpp like in a battlefield:

    But again, if I compile the project I just get one tiny warning for an unused parameter...

    I guess the problem is in the "Code Model"? I dont really understand how this works. I have this settings:

    My Kit is a bit specific because I use GCC from the Raspberry Toolchain (4.9.?) and as sysroot a copy from my raspberry pi.


    This worked without errors until recent Qt-Creator reinstall.

    I also get this warning about "code model could not parse in included file":

    Any Ideas why bad luck hunts me so hard ? :)

  • Solved. Under KITS->compilers I obviously had selected a wrong g++ compiler.
    I have to use this one:


    as decribed here:

    Once selected all errors gone.

Log in to reply