I have svg image with this attributes: viewBox=“0 0 100 100”
This is basic code which I use for displaying svg:
Image{
width: 50
height: 50
source: "test.svg"
}
and it’s not ok because image is rasterized before resizing to width and height values(50,50).
This code works perfect on all resolution:
Image{
width: 50
height: 50
sourceSize.width: width
sourceSize.height: height
source: "test.svg"
}
because image is drawn in exact dimensions which is needed!
Is it posible to get same functionality in a TextEdit where <img> tag is used?
< img src=“test.svg” width=“50” height=“50” >
This code doesn’t work because sourceSize can’t be set… and image is rasterized before resizing and displaying…
Maybe there is some other way to accomplish this?
The main goal is displaying some text and some inline images(like smileys in chat application). I use TextEdit because it can display RichText(html in this case), and that html normaly works in IE or FF browser – the svg looks perfect. Why it’s not working in Qt? Is there any other way to mix text and images?
↧