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:

Qt Code:
  1. ui->plainTextEdit->setInputMethodHints(Qt::ImhDigitsOnly);
To copy to clipboard, switch view to plain text mode 

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