//...
// https://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg
if (!bla.
loadFile(QRectF(0,
0,
640,
480),
"e:/SVG_logo.svg")) qDebug("fail to load?");
else
qDebug("load OK");
bla.attach(myPlot);
QwtPlot myPlot;
//...
QwtPlotSvgItem bla("test");
// https://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg
if (!bla.loadFile(QRectF(0,0,640,480), "e:/SVG_logo.svg"))
qDebug("fail to load?");
else
qDebug("load OK");
bla.attach(myPlot);
To copy to clipboard, switch view to plain text mode
Also a stripped down svg fails:
<?xml version="1.0" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 100 100">
<rect
id="background"
fill="#FF9900"
width="100"
height="100"
rx="4"
ry="4"/>
</svg>
<?xml version="1.0" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 100 100">
<rect
id="background"
fill="#FF9900"
width="100"
height="100"
rx="4"
ry="4"/>
</svg>
To copy to clipboard, switch view to plain text mode
Fails means: it is not displayed. It loads fine (true is returned).
Bookmarks