I want to disable a text edit (when a button is clicked), so the user can no longer be able to add text in there.
Is there any way to do that?
Thanks for your help!!
Use this to disable text edit (QTextEdit) in PyQt
self.textEdit.setDisabled(True)
You can set it as read-only with:
self.textEdit.setReadOnly(True)
I prefer this to the setDisabled
method because it maintains its original visual appearance.
Call the text edit object's setDisabled() function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With