[Qt-interest] make QTextEdit not editable rather than disable it ?
Nikos Chantziaras
realnc at arcor.de
Sun Oct 3 13:49:22 CEST 2010
On 10/03/2010 12:50 PM, Aaron Lewis wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
> Is there anyway to make a QTextEdit not editable , i don't really
> prefer to disable it , cos some Qt styles will put a different color
> and style on it , and i couldn't got text clear seen.
>
> like textEdit->setEditable(false) , any function provided ?
>
If it's always going to be read-only, you can use a QTextBrowser, which
is read-only by default. If not, then:
http://doc.trolltech.com/4.7/qtextedit.html#readOnly-prop
More information about the Qt-interest-old
mailing list