Results 1 to 4 of 4

Thread: QwtTextLabel to render some MathML code

  1. #1
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QwtTextLabel to render some MathML code

    Hi, I am trying to render some MathML code using QwtTextLabel, but though different parts of my equation get rendered where I would expect, the end result is still ugly and, in fact, useless.

    I am pretty certain that I am missing something, but since there doesn't seem to be any Qwt example on how to do that, I am not sure what I am missing.

    Basically, I did what is mentioned in the documentation, i.e.

    Qt Code:
    1. #include <qwt_mathml_text_engine.h>
    2.  
    3. QwtText::setTextEngine(QwtText::MathMLText, new QwtMathMLTextEngine());
    To copy to clipboard, switch view to plain text mode 
    From there, I just used QwtTextLabel as 'normal'. Anyway, attached are what I get using QwtTextLabel with QwtMathMLTextEngine as the text engine (Qwt.jpg), and then what I get using QtMmlWidget (QtMmlWidget.jpg).

    Anyway, I am trying to move from QtMmlWidget to Qwt, since the former is not maintained anymore. So, any help would be most appreciated.

    Note #1: even QtMmlWidget doesn't do a superb job of rendering MathML code, but at least I am able to get something...
    Note #2: even with the 'bad' rendering, I noticed that QwtTextLabel was rather slow (compared to QtMmlWidget), but maybe it's because I haven't got things to work the way they should...?

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtTextLabel to render some MathML code

    Quote Originally Posted by agarny View Post
    Anyway, I am trying to move from QtMmlWidget to Qwt, since the former is not maintained anymore.
    Note, that both use the same MathML renderer - so comparing them is somehow pointless,

    Uwe

  3. #3
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtTextLabel to render some MathML code

    Hi Uwe,

    Yes, I know about Qwt using QtMmlWidget's MathML renderer. Also, I have never said I was trying to compare the two of them. All I said, from what you quoted, is that QtMmlWidget is not maintained anymore while Qwt is (thanks to you). In other words, should an issue ever be found with the MathML renderer, or an improvement suggested, then it will have a good chance of being addressed in Qwt while next to no chance of being addressed in QtMmlWidget. That's all I am interested in and what I would like to achieve by switching to Qwt.

    Alan

  4. #4
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtTextLabel to render some MathML code

    For whoever interested in using MathML with Qwt: http://www.qtcentre.org/threads/5429...735#post249735.

Similar Threads

  1. Support of MathML in Qt
    By oficjalne100 in forum Newbie
    Replies: 0
    Last Post: 28th September 2011, 12:18
  2. Support of MathML in Qt
    By oficjalne100 in forum General Discussion
    Replies: 0
    Last Post: 25th September 2011, 17:24
  3. Printing Problem in QwtTextLabel
    By umulingu in forum Qwt
    Replies: 1
    Last Post: 26th March 2010, 10:34
  4. Qwt 5 - render TeX text
    By ak in forum Qwt
    Replies: 2
    Last Post: 1st May 2007, 09:08
  5. Volume Render
    By showhand in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2006, 10:04

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.