Bacim OUESLATI
Bacim OUESLATI

Reputation: 33

QT : "this file is not part of any project"

enter image description here

I created a project folder (test1), then when creating the C++ source file main.cpp, it says that this file is not part of any project although i created it in the same project test1 by doing : File -> new file or project -> C++ -> C++ source file.

Upvotes: 1

Views: 2803

Answers (2)

Pyotr Baykalov
Pyotr Baykalov

Reputation: 1

For a .creator project (without Qmake) deleting the .creator.user file while Qt Creator is closed helped in my case.

Upvotes: 0

Luca Carlon
Luca Carlon

Reputation: 9976

Open the .pro file and check if something like this is missing:

SOURCES += main.cpp

(with proper path if needed)

Also it seems you did not configure the project. In "projects" you should choose a kit to use when building. This may also be a cause of the warning.

Upvotes: 1

Related Questions