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. High-dpi Image item
Forum Updated to NodeBB v4.3 + New Features

High-dpi Image item

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.2k 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.
  • 2 Offline
    2 Offline
    2r273gd
    wrote on last edited by
    #1

    Is Image item supposed to automatically detect that there is a "@2x" file alternative on high-dpi displays and use it? That's what I understood from http://blog.qt.digia.com/blog/2013/04/25/retina-display-support-for-mac-os-ios-and-x11/

    Yet a simple example, having test.jpg and test@2x.jpg image files:

    @Image {
    source: "test.jpg"
    }@

    Shows test.jpg on my retina display, whether ran by qmlscene or by my C++ application.

    I tried different combinations and tricks and nothing seems to work. In Qt examples "@2x" images seem to be used only for icons.

    If anyone could hint me how to use Image with high-dpi file alternatives or point me to an alternative, I'd sure appreciate it.

    1 Reply Last reply
    0
    • O Offline
      O Offline
      onek24
      wrote on last edited by
      #2

      Hey, i never worked with high-res images in QML, but it actually should display it in high-res. I can't see a reason why it should not work. For example: if you've got an image with the resolution of 2560*1440 and you set
      an QML Image to its size:
      @Image {
      width: 2560; height: 1440
      source: "image.jpg"
      }@
      then it actually should display it in this resolution. The real size of the image(the size which it would be on --your display) depends on your display resolution.

      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