Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to add a c++ file in Qt Creator whose name starts with capital letters ? It automatically makes it small letter

Tags:

c++

qt

qt-creator

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.

like image 560
Sutirtha Ghosh Avatar asked Jan 14 '16 14:01

Sutirtha Ghosh


People also ask

What is the difference between Qt and Qt Creator?

Qt Designer is for designing Dialogs and Main Windows (. ui files). Qt Creator is a full IDE for developing your program.

Is Qt Creator necessary?

You certainly don't have to use QtCreator to write a Qt program. You also don't have to use qmake but you are asking for trouble by not using it. To do anything even remotely interesting in Qt you will inevitably end up subclassing QObject .

How do you open a QT Creator?

Navigate to the project you wish to open in your file system, then just double-click on the . pro file (i.e. Warmup.pro ). This will open Qt Creator for you with this project.


2 Answers

To solve this issue do the following:

[Tools] -> [Options] -> [C++] -> [File Naming] -> uncheck "Lower case file names"

like image 161
smoothware Avatar answered Sep 21 '22 23:09

smoothware


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.

Qt wizard new C++ class

like image 34
vicrucann Avatar answered Sep 23 '22 23:09

vicrucann