PDA

View Full Version : uppercase letters in a QTextEdit



annitaz
5th July 2013, 16:32
I am designing a notepad application and I want to change the case of the text in QTextEdit to uppercase.
I tried
if (name == "Uppercase") {
textEdit->setFont(Qt::Alluppercase);
}

but it doesn't work. Which property can I use?

karankumar1609
6th July 2013, 06:20
You can use "setInputMethod" method of QTextEdit and assign it "Qt::ImhPreferUppercase"

AND IT IS SOLVED.

CHEERS

annitaz
6th July 2013, 08:34
setInputMethod does not exist. I tried setInputMethodHints but no result