Well dont you think its much cumbersome to change the case now and then??
I don't get what you mean? The case doesn't change, for objects like QApplication, the case is set in stone. You can't change it, you HAVE to use that casing. Therefore all applications use the same word EXACTLY, including the same case.
Secondly, QtCreator supports code completion. So if you type qapp, it automatically suggests QApplication, and if you type qhb, it will suggest QHBoxLayout, etc. You don't need to remember the case of every letter, although most times its quite obvious.
i meant that to type QHBoxLayout...and others you need to shift from lower case to uppercase while typing ...this very thing i don't like...do you get my prob now?
Well, i understand that my doubt is too silly.but my editor doesn't suggest QHBoxLayout on typing qhb:have i turned anything off or m using the other version...
in the about qt creator tab my qt creator says :
Qt Creator 1.2.1
Based on Qt 4.5.3 (32 bit)
My editor QTCreator doesnt suggest that either, but if I have a object of a Qt class, when using that object it will suggest the object methods, even if those methods are uppercase and I am typing in lowercase. If you prefer lowercase typing you can use it for your variables and class names, althought I think ist not a big deal using "Fisrt Letter Uppercase" writting.![]()
__________________________________________________
My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
Like my projects ? Buy me a kofi
Maybe some settings need modification on your version of QtCreator. Goto tools->Options->Text Editor->Completion and untick "Case-sensitive completion".
Then type 'qhb' and press Ctrl+Space. You should notice that 'qhb' gets changed to 'QHBoxLayout'. This will also work for all your own variables too, so you could have one like 'MyVeryLongVariableName' and then just type 'my' and Ctrl+Space. If there's more than one match, it'll list them.
So now theres no need not to have long descriptive variable names
Personally, I prefer the first letter lower case, and then each additional part upper case. Eg. 'lastActionState'.
john_god (24th December 2009)
I didnt know about Ctrl+Space. Thanks.
__________________________________________________
My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
Like my projects ? Buy me a kofi
It's a coding convention. You just have to live with that. Of course you can typedef every class in Qt to lowercase only but this wouldn't make much sense. And the code would be completely unreadable. The general tendency in C++ (and OOP in general) is that class names should start with a capital letter.
See this as well: http://en.wikipedia.org/wiki/CamelCase
Bookmarks