[Qt-interest] Customize the HTML generated by QTextEdit?

Joshua Grauman jnfo-c at grauman.com
Fri Feb 4 06:04:18 CET 2011


I've looked into this and haven't found a way (not that that proves there 
isn't one!). If you find a way, please let me know! I ended up rolling my 
own solution that runs through a QTextEdit with a QTextCursor and 
generates my own markup, similar to what you have. Thanks.

Josh

> Is it possible to customize the HTML generated by QTextEdit?
>
> For example, when calling text_editor->setFontWeight(QFont::Bold), QTextEdit
> generates the following:
>
> <span style=" font-weight:600;">bold text</span>
>
> whereas I'd like it to generate the following:
>
> <strong>bold text</strong>
>
> Is this possible?
>
> Grant Limberg
>
>
> glimberg at cedrus.com
> http://www.cedrus.com/
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>



More information about the Qt-interest-old mailing list