Hi Mark,

Den 28-02-2012 18:04, Mark Tucker skrev:
> I’ve encountered an issue with QML whereby I have some text strings that
> require some superscript characters in them – I’ve wrapped these
> characters with the <sup></sup> tags, and everything then works nicely.
> Now I assume that because of the tags, the text is being treated as Rich
> Text.
>
> The problem I then have is that Text elements that are in Rich Text mode
> then totally ignore the lineHeight/lineHeightMode properties, and there
> seems to be no way of specifying this with HTML either, as the css
> property “line-height” isn’t mentioned as a supported property on the
> supported HTML subset page [1].
>
> If I remove the <sup> tags then things work as I expect and the
> lineHeight is taken into account.
>
> Anyone got any ideas how I can mix these two?

It sounds like you hit a problem that can't be solved directly. You have 
some options, but they're not particularly great.

One of those is to accept that this isn't going to work. It might be 
that you can do something with the font tag that's good enough. Or some 
other workaround that gives the same kind of solution, but not exactly 
what you wanted.

Another way is to implement your own QDeclarativeItem and paint the 
contents yourself. Not particularly fun, but if you want something done, 
you sometimes have to do it yourself.

Or you could patch Qt to add those to the HTML subset. If a Qt patch is 
acceptable for your project, this might be your best option. Of course 
combined with sending the patch upstream for future versions :)

Bo Thorsen,
Fionia Software.

-- 

Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
_______________________________________________
Qt-qml mailing list
Qt-qml@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to