0
votes

I work for a big project and i would like to put all .cpp & .h files in one folder . I did that in .pro file : SOURCES += src/main.cpp src/test.cpp HEADERS += src/test.h

The problem that in QT creator the files was in Headers>src>test.h and not in Headers>test.h directly .

2
Why is that a problem? That's how Qt Creator shows the project hierarchy. If you don't like it, you could patch Qt Creator to change this behavior. AFAIK, it's not a configurable option at the moment.Kuba hasn't forgotten Monica
I would like that in the file system the .h & .cpp files put together in one folder , but in Qt creator all the.h files under Header files and all .cpp files under the Sources folder. I don't know why the default behavior for Qt creator is putting all .cpp, .h, and qml files in project folder directlyAdabH
it's not a configurable option at the moment.eyllanesc
Why the downvotes??tomalbrc

2 Answers

0
votes

Qt Creator visualizes the build system. In qmake there is a huge difference in how headers and sources are handled. That's why Creator keeps them separate.

How should Creator keep all the headers in a flat out when they are stored in a tree? That makes little sense IMHO. People usually group files in folders for a reason.

0
votes

I would like that in the file system the .h & .cpp files put together in one folder

You have to implement it yourself by modifying your copy of Qt Creator.

I don't know why the default behavior [...]

... because different people have different preferences, and the entire world doesn't think the same.