High DPI support for custom image in QComboBox::down-arrow
-
Hi all,
I'm struggling to get a good result when a custom QComboBox::down-arrow image and a high DPI screen.
I'm using Application::applicationPixelRatio(2) to draw elements of my GUI in higher quality.But my custom QComboBox drop-down icon, scales correctly, but not smoothly.
That is, it is drawn the correct size, but clearly using the original low resolution image and not scaled up smoothly.I have tried a number of different things to get the QComboBox down-arrow drawing correctly in the 2x High DPI mode, but none of them worked correctly.
So what is the correct / recommended / best, way to get a clean looking down-arrow for my QComboBoxes in both normal and High DPI ( ie 2x) application Settings?
I'm currently using a style sheet with the following line to specify the custom image for my down-arrow
QComboBox::down-arrow { image: url(:/MyCustomDownArrow.png); width: 9px; height: 9px; }I've also tried using a higher res PNG, but that does not seem to work either?
I would be happy to replace the style sheet with a runtime created Pixmap or icon, But I have not seen any docs that indicate that is possible.Thanks in advance,
James