I am trying to add a c++ file to a existing Qt project but I can't make the name of the c++ file start with a capital letter. E.g. DownloadOsm.cpp becomes downloadosm.cpp automatically using the wizard.
-
1You could probably add it to the appropriate `.pro` or `.pri` file manually. – Steve Jan 14 '16 at 15:20
-
You can build a Qt project manually, e.g. by having your own (small) `Makefile` – Basile Starynkevitch Jan 14 '16 at 18:21
3 Answers
To solve this issue do the following:
[Tools] -> [Options] -> [C++] -> [File Naming] -> uncheck "Lower case file names"

- 898
- 7
- 19
This is indeed the case when you try to use the wizard to add new C++ Source File or C++ Header File. For those wizards - I could not find the way to make the names to follow the name convention you chose for your class name.
However, I found that when you use C++ Class wizard, it allows you to edit the names of header and source files. So, I try to only use the C++ Class wizard, it saves me time to rename just created files and is quite convenient for my purposes.

- 1,703
- 1
- 24
- 34
I made a .cpp file which satisfy your conditions in the following way:
Create .cpp file
Open your Qt project directory and create a new .cpp file (DownloadOsm.cpp)
Add to project
Open your project (.pro) file in Qt Creator and right click on the Sources subfolder and select Add Existing Files from there choose your .cpp file (DownloadOsm.cpp)

- 6,874
- 9
- 28
- 41