Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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'
    

    Bildschirmfoto_2019-11-20_15-49-44.png

    And then this continues in my mainwindow.cpp like in a battlefield:
    Bildschirmfoto_2019-11-20_15-51-20.png

    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:
    Bildschirmfoto_2019-11-20_15-54-32.png

    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.

    Bildschirmfoto_2019-11-20_15-55-35.png

    This worked without errors until recent Qt-Creator reinstall.

    I also get this warning about "code model could not parse in included file":
    Bildschirmfoto_2019-11-20_15-57-33.png

    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:

    ~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
    

    as decribed here:
    https://wiki.qt.io/RaspberryPi2EGLFS

    Once selected all errors gone.


Log in to reply