Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How do I scale .svg within html tags in QML

How do I scale .svg within html tags in QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlsvg
1 Posts 1 Posters 737 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.
  • C Offline
    C Offline
    CarlStayBack
    wrote on last edited by CarlStayBack
    #1

    I have a html line which looks like this:
    return "<img align='right' width='" + 100 * myAppInfo.ratio + "' height='" + 100 * myAppInfo.ratio + "' src='qrc:/pics/svg/" + myAppInfo.icon + "'/>"

    The result of this is that my svg picture look bad(like a bad .jpg or even worse). The problem is 100% in rescaling because I tried to remove height and width attributes - looks fine, but I need to rescale it to make it bigger. There's also possible to just edit source of my .svg, but I need scaleness to depend on myAppInfo.ration (I use it on different screens including desktop/mobile). So, the only approach is to fix it within this html line. Can you help me?

    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