[Qt-interest] QTextEdit contents changed highlight the color
Sujan Dasmahapatra
sdh at lmwindpower.com
Wed Jun 8 14:03:22 CEST 2011
Dear Friends
I need your help in implementing a TextEdit....I have the functionality
of saving option of the text available in the TextEdit. But everytime
user loads a file and when starts editing the file the contents changed
in the file should be highlighted with some color. And when save it it
should return back to the original black & white color.
I am not getting any idea about this. Any suggestions would be highly
appreciated.
QString contents;
QTextEdit *textEdit = new QTextEdit(this);
textEdit->setPlainText(contents);
textEdit->show();
Now after displaying the contents user wants to modify the contents, so
all the contents only the modified part should be highlighted with some
color, and when save it then come back to the normal mode.
Kind Regards,
Sujan Dasmahapatra
Project Leader, Aero Group
Aero Group
Tel +91 80 66470248
Mob
sdh at lmwindpower.com <mailto:%25EMAIL%25>
LM Wind Power Blades
lmwindpower.com
Together we capture the wind to power a cleaner world
________________________________
This e-mail and any attachments are confidential. If you are not the
named or intended recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any purpose,
or store or copy the information in any medium. Any unauthorized
disclosure, use or storage is prohibited and might be unlawful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110608/fccd40a0/attachment.html
More information about the Qt-interest-old
mailing list