Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "This file is not part of any project. The code model might have issues parsing this file properly." bug in Qt Creator?

Tags:

c++

qt

I just installed Qt creator (for the 10th time probably), and even when I follow the simple steps to create a new Qt Widget or Qt Console applications, I get this error. Extremely frustrated with various Qt Creator bugs. Help will be appreciate.

enter image description here

like image 267
Kambiz Avatar asked Nov 06 '22 08:11

Kambiz


1 Answers

If you look closely at your workspace, you can see, that there are two projects. One project is called Sample, one project is called Widget. The active project is "Sample". You can tell that from the project browser as the Sample project is in bold letters. So building and debugging applies only to the Sample project.

The open file where you set your breakpoints in is "Widget/main.cpp", it belongs to the other non-active "Widget" project. So when you start the debugger, the environment warns you that this will not work. Completely correct behaviour.

like image 178
Jens Avatar answered Nov 14 '22 10:11

Jens