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,
Recommended off-line reading:
The Foundations of Qt Development (ISBN: 1-59059-831-8)