I have a Text element with some HTML content which contains an <img>
tag. I want to adjust the baseline of this image since it displays a rasterized latex math formula. Detecting the baseline within the image is another task. This question is how to adjust the vertical position of the image when I know how many pixels I have to move the image.
In HTML, I can use relative positioning. Since Qt only supports a subset of CSS, I have to use different CSS properties. However, none of them seem to be working when displaying HTML using a QML Text element! What's wrong?
Text {
text: 'test <img style="padding: 100px" src="latex/182.png"/>'
}
This displays exactly the same compared to leaving out the style attribute. It's like QML ignores style attributes. Does QML use another (even tinier) HTML engine?
I already found out that images are only supported in the "rich text" mode (there also is the "styled text" mode which doesn't support images but other HTML tags like <b>
and <i>
).