Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, February 2007
QTextEdit::setTextFormat, anyone?

Pages: Prev | 1 | 2 | Next

Message 16 in thread

> > The default for QTextEdit is:
> > Q_PROPERTY(QString html READ toHtml WRITE setHtml NOTIFY textChanged
> > USER true)
> >
> 
> I've stumbled across the read/write properties inside QItemDelegate
> during debugging, but wasn't aware that it is sooo easy to override
> them. Thanks a lot, that instantly worked!
> 
> M
> 
> 
> P.S.: I was looking for a built-in way without creating a custom class
> because the Qt3-to-Qt4 porting guide said something about using "the
new
> QTextEdit API" as a replacement for the Qt3 method setTextFormat.
> Apparently, there is no way to do that with the new API, but what the
> heck :)

Did you look at the implementation of the setTextFormat?  More then
once, when I needed QT3 support functionality, but didn't want the QT3
support lib, I wind up looking at how it was implemented, and simply
reimplement that code.

Scott

--
 [ signature omitted ]