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. High DPI (@2x) images in HTML based widgets like ToolTips and QLabels
Forum Update on Monday, May 27th 2025

High DPI (@2x) images in HTML based widgets like ToolTips and QLabels

Scheduled Pinned Locked Moved Unsolved General and Desktop
high dpifont scaling@2x
1 Posts 1 Posters 401 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.
  • W Offline
    W Offline
    Will
    wrote on 24 Jun 2019, 22:09 last edited by
    #1

    How can I show high-DPI images in widgets that use HTML text - such as a widget's tooltips and a QLabel?

    I've tried using something like the following but it shows it at 2x the size, instead of the same size but at 2x the pixel density.

    <img src=":/my_image@2x.png">

    I've also tried the "srcset" tag, but that seems to be ignored.
    e.g.

    <img src=":/my_image.png" srcset=":/my_image@2x.png 2x">

    There doesn't seem to be any info on this anywhere, and the graphics look comparatively bad now that I've converted all of my other UI images over to 2x resolution.

    1 Reply Last reply
    0

    1/1

    24 Jun 2019, 22:09

    • Login

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