Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Implementation of mathematical expressions in the text box



  • Is it possible to implement in Qplaintextedit or Qtextedit input of mathematical formulas (roots, fractions, integrals) and display as in word or as in graphic calculators? If possible, which libraries and functions to connect
    There was an idea to use Qplaintextedit and to lower and raise the line depending on the formula, are there any such functions?

    Adding character encoding will not display as needed

    0_1566202452221_248c1bd7-6ed7-448b-a13c-bdde528ad222-image.png


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Qwt's QwtText class might be what you are looking for.



  • @malik yes, please look at the MathML capability of the widget suggested by @SGaist



  • The MathML rendered can also be found in a standalone version ( with improvements ) here: https://github.com/uwerat/qwt-mml-dev.

    The code originally comes from a Qt solutions package. It can be useful, but does not have the quality you would expect from Qwt or what you find in the official set of Qt modules. I'm not 100% sure of the license myself - the code comes from a version the has once been released under the LGPL by Nokia, but when having a commercial license you might be allowed to do more with it. The patches that have been made since then are formally under the Qwt license, but in fact I don't care.

    Uwe



  • Our Qt-based app needed a MathML renderer, and we found one at www.mmlsoft.com (commercial license). Their Formulator widget used to be based on Qt widgets. It doesn't seem to still be available in that form, but maybe they can help. It worked well for us.


Log in to reply