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. Saving a QWidget in vector graphic format as a WMF or EMF file

Saving a QWidget in vector graphic format as a WMF or EMF file

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt5.8qwidgetvector graphicsemfwmf
3 Posts 3 Posters 1.6k Views
  • 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.
  • O Offline
    O Offline
    onat
    wrote on 10 Oct 2018, 14:35 last edited by
    #1

    I need to implement a functionality in my application that will save the content of widgets as vector graphics in a WMF or EMF file. I did a lot of research and it seems that Qt does not have a standard library for manipulating these kinds of files. I tried installing libqemf (https://iondev.ro/qemf/), but couldnt get it to work. Is there any other library or tool that I can use for this purpose.
    Thank you for your attention.

    P 1 Reply Last reply 10 Oct 2018, 15:32
    0
    • O onat
      10 Oct 2018, 14:35

      I need to implement a functionality in my application that will save the content of widgets as vector graphics in a WMF or EMF file. I did a lot of research and it seems that Qt does not have a standard library for manipulating these kinds of files. I tried installing libqemf (https://iondev.ro/qemf/), but couldnt get it to work. Is there any other library or tool that I can use for this purpose.
      Thank you for your attention.

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 10 Oct 2018, 15:32 last edited by
      #2

      @onat said in Saving a QWidget in vector graphic format as a WMF or EMF file:

      but couldnt get it to work.

      What is the error you're getting?
      Where you able to compile/run the Emfviewer example provided with the download?

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 10 Oct 2018, 16:47 last edited by
        #3

        Hi
        The qemf seems able to only rendering of EMF not generating it.

        What is the data you want to put in the emf file ?

        Qt has http://doc.qt.io/qt-5/qpicture.html#details
        that works like WMF but its not same (file) format at all.

        However, its pretty simle to generate WMF/EMF from windows API.
        (CreateEnhMetaFile)

        1 Reply Last reply
        2

        3/3

        10 Oct 2018, 16:47

        • Login

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