M
M
mrZurg2014-11-18 23:54:41
Qt
mrZurg, 2014-11-18 23:54:41

How to display SVG image in QML?

With the "tag" Imgae, as a normal picture is not displayed, but I don’t know how yet, I have already rummaged through the entire Internet.
And is it convenient to use svg in Qt (qml) to display graphs?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yustas Alexu, 2014-11-19
@Yuxus

Try rendering through canvas if you really need to. In general, svg is supported - a quote from the official documentation :
Example:

import QtQuick 1.0
import QtDesktop 0.1
     
    Window {
      title: "SVG Test"
      width: 640 
      height: 360
      visible: true 
      focus: true
      Keys.onEscapePressed: Qt.quit()
      Image {
        source: "markc.svg"
        sourceSize.width: parent.width
        sourceSize.height: parent.height
      }
    }

And for charts there is such a thing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question