Reputation: 641
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!!
Upvotes: 10
Views: 22864
Reputation: 333
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.
Upvotes: 11
Reputation: 7102
Use this to disable text edit (QTextEdit) in PyQt
self.textEdit.setDisabled(True)
Upvotes: 8