How to show math equations in QTextEdit?

Does anyone know how to show mathematical equations in QTextEdit written in any format (TXT, MathML, MML, LaTeX, HTML, XML or anything else) using only Python that does not use third-party packages like Latex. I tried to find the MathML Widget from Qt, but it disappeared from my website and I could not find it.

I did not fuss about the source of the equation (neither a line, nor a file). I just can't figure out how to show them beautifully (just like they appear on a web page, like http://en.wikipedia.org/wiki/MathML ).

My QTextEdit is currently receiving an HTML string. I tried to include the MathML example from this Wikipedia article, but it does not display it properly, it ignores all MathML tags.

We will be very grateful for your help. Thanks.

+4
source share
1 answer

You can use this: http://qwt.sourceforge.net/

It seems funny that I cannot find the MathML widget in Qt.

EDIT: I think they are trying to replace it with webkit support, but it's not implemented yet: http://developer.qt.nokia.com/wiki/Qt_Webkit_HTML5_Score

0
source

Source: https://habr.com/ru/post/1344712/


All Articles