Results 1 to 2 of 2

Thread: Is MathML workable in Qwt?

  1. #1
    Join Date
    Nov 2010
    Posts
    47
    Thanks
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Is MathML workable in Qwt?

    Created very simple MathML formula with this editor, inserted it into my code:

    Qt Code:
    1. logitLabel->setPlainText(logitFormula(1, 2, 3, 4));
    2.  
    3. QString SetupPanel::logitFormula(double arg1, double arg2, double arg3, double arg4) const
    4. {
    5. QString formula = QString(
    6. "<math><mn>%1</mn><mo>+</mo><mfrac><mn>%2</mn><mrow><mn>1</mn><mo>+</mo>"
    7. "<msup><mi>e</mi><mrow><mn>%3</mn><mo>&#x000B7;</mo><mi>X</mi><mo>+</mo>"
    8. "<mn>%4</mn></mrow></msup></mrow></mfrac></math>")
    9. .arg(QString::number(arg1))
    10. .arg(QString::number(arg2))
    11. .arg(QString::number(arg3))
    12. .arg(QString::number(arg4));
    13.  
    14. return formula;
    15. }
    To copy to clipboard, switch view to plain text mode 

    However formula looks strange in application:
    bad_formula.png

    That is how it looks in editor:
    good_formula.png

    What is wrong here: MathML implementation in Qwt, formula editor, need to simplify formula or what? Is MathML ready for production here or need to search for other possibilities to render formulas?
    Last edited by AlekseyK; 25th May 2016 at 02:28.

  2. #2
    Join Date
    Nov 2010
    Posts
    47
    Thanks
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Is MathML workable in Qwt?

    Some solution could be found here: http://www.qtcentre.org/threads/5429...ath-expression

    Hope Qwt author will see the problem and able to add necessary patches to official sources repository.

Similar Threads

  1. Replies: 23
    Last Post: 31st May 2016, 09:59
  2. Replies: 3
    Last Post: 22nd August 2013, 12:57
  3. Support of MathML in Qt
    By oficjalne100 in forum Newbie
    Replies: 0
    Last Post: 28th September 2011, 12:18
  4. Support of MathML in Qt
    By oficjalne100 in forum General Discussion
    Replies: 0
    Last Post: 25th September 2011, 17:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.