Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. SVG in QML-app for iOS
Forum Updated to NodeBB v4.3 + New Features

SVG in QML-app for iOS

Scheduled Pinned Locked Moved Mobile and Embedded
iosqmlqtquick controlqtquicksvg
3 Posts 2 Posters 2.6k Views 1 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.
  • R Offline
    R Offline
    randsfjorden
    wrote on 13 Apr 2016, 12:14 last edited by
    #1

    Dear Qt-Community,
    I just wrote an app in QML, using Qt-Creator 3.6 and Qt 5.6. I have imported svg (Qt += svg). All the images I have are SVG-files, so the whole Layout is resizable. To adapt the size of the svgs to render, I changed the sourceSize.height and sourceSize.width property. It works all fine in Windows, on Mac Desktop, on Android and on Windows RT.

    However, in iOS the svgs er never sharp, I always get a blurred image as if the svg was rendered to its original size and then scaled up or down. The image comes up - so the problem can't be that I didn't import the svg statements. It just has a horrible quality. I just tested inside virtual iPhones 6, 5 and 4s by Xcode. On iOS changing the sourceSize property doesn't seem to have any affect on the rendered size of the image. It looks exactly the same when I change the usual height and width property of the QML-image. I also tried to turn off and on antialiasing, smooth and mipmap, but it didn't make the svg's sharper either.

    Is that a bug? Or anything I have overseen?

    Thank you very much

    1 Reply Last reply
    0
    • D Offline
      D Offline
      douyw
      wrote on 15 Apr 2016, 08:36 last edited by
      #2

      A little off-topic. In my previous experience, svg icons occupied too much memory, so, I decided using png instead, just two years ago. If it's a good option now, it will be considered in my future projects.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        randsfjorden
        wrote on 20 Apr 2016, 09:05 last edited by
        #3

        I think then I need to use png-files instead. Even though that is exhausting - as the app works on other platforms. So I need to create png's just for iOS. But that's the way it goes...

        Thank you very much for helping me!

        If anyone has an idea on how to use the svg's I'll be happy to hear about it :).

        1 Reply Last reply
        0

        1/3

        13 Apr 2016, 12:14

        • Login

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