Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to save in SVG
Forum Updated to NodeBB v4.3 + New Features

How to save in SVG

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 1.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    skylendar
    wrote on last edited by
    #1

    Thank you for reading and possibly answering this post if you can.

    In Qt4, you were able to save a QPicture in a SVG file with the method:

    myQPicture.save(myfile, "svg")

    However, this possiblilty has desappeared in Qt5.

    What's the equivalent operation in Qt5.

    Thx again for answering

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi
      have you seen http://doc.qt.io/qt-5/qtsvg-svggenerator-example.html
      Not sure it does what you want but its seems you can use
      painter with svg generator and hence draw the picture on it. (maybe) :)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        skylendar
        wrote on last edited by
        #3

        Ah ok, I saw it, but it is far more complicated than before.

        Thank you anyway for the tip.

        mrjjM 1 Reply Last reply
        0
        • S skylendar

          Ah ok, I saw it, but it is far more complicated than before.

          Thank you anyway for the tip.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @skylendar
          Agree, compared to the oneliner.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            Did you add "QT += svg" ?

            The svg image format plugin has been moved to that module.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              After a more detailed check: the svg plugin is read-only (also for Qt 4)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved