PDA

View Full Version : Disable TextEdit input



Splatify
23rd February 2011, 19:31
Hi all,

I was wondering how to disable a textedit so the user can no longer modify the text within it, anyone know how to go about this?

Is there also a way to disable a button (without hiding it) so the user can no longer press it?

Thanks in advanced for your time and trouble

Ok I've solved this. The minute i posted this I found the answer:


ui->textEdit->setDisabled(true)

Lol

Thanks anyway

BalaQT
24th February 2011, 07:43
hi,
if you just want the user not to modify the contents, you can also use
void setReadOnly (bool)

Bala