Important: Please read the Qt Code of Conduct -

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

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

    <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.