Re: How to force capital letters in input field?
Because you are modifying an event which already has been executed.
BTW, why doesn't the above code I tried to use work?
For the modifier to have an effect you need to post an event which contains it.
You can add discrimination code in your slot to use Qstring::toUpper() only when you need it.
If I will use the signal editTextChanged(QString), then it will capitalize everything,
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Watch these videos, and read his books they are must if you want to write clean code:
Recommended off-line reading Qt:
The Foundations of Qt Development (ISBN: 1-59059-831-8)