PDA

View Full Version : QPlainTextEdit: setInputMethodHints(Qt::ImhDigitsOnly); has no effect



Anonymous13
10th December 2013, 14:32
I am using Qt 5.1.1 with Visual Studio 2012 and Qt Creator 2.8.1.
I want to allow only digits within my QPlainTextEdit so I am using the following method:


ui->plainTextEdit->setInputMethodHints(Qt::ImhDigitsOnly);

However, this has no effect. I can still enter characters :confused: