How do I scale .svg within html tags in QML



  • 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?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.