QT是否支持svg? [英] Does QT support svg?

查看:557
本文介绍了QT是否支持svg?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试"QT示例"和示例"中的SVG Viewer,并且尝试使用的所有SVG均无法正确显示.

I'm testing the SVG Viewer, located in QT Examples and Example, and all SVG I tried doesnt show properly.

QT是否已完全支持SVG,还是需要额外的工作?

Is SVG fully suported in QT, or does it need extra work?

在SVG Viewer中,大多数元素未显示.

In SVG Viewer most of the elements are not shown.

我还尝试了QSvgWidget,结果甚至比SVG Viewer的结果还要糟糕.

I also tried QSvgWidget and results are even worse than thoose from SVG Viewer.

推荐答案

Qt aslo支持svg

Qt aslo suport svg in

  Image {source:'someinage.svg'}

您需要执行链接中所说的内容,例如felix在评论中张贴的内容

you need to do what is said in link what felix posted in coments

特别是当我将手动参数设置为周时,我得到了它与inkscape的合理配合(将其扩展为"plain svg" incspace)

i got it reasonably working with inkscape(exporing it to "plain svg" incspace) especialy when i tweeked manualy parameter

viewBox

viewbox="0 0 <width> <height>" 
// <width> and <height> was multiple of widhth and height of image in qml
// you must obyde ration of <width> and <height>
//i recomend higher  resolution qt can not scale svg properly up

仍然存在渐变问题

这篇关于QT是否支持svg?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆