Qt seems to use different roundings when calculating pixel values from device independent pixels, I have not checked the Qt source code, but I have done some testing.
My screen is set to 125% scaling so I have a device pixel ratio of 1.25 in Qt.
Calling the following method
Results in a pixmap that is 33x33 pixels
26 * 1.25 = 32.5 rounded up to 33
This renders an image that is 32x32 pixels big.
26 * 1.25 = 32.5 rounded down to 32
This causes a bitmap scaling to occur from 33x33 -> 32x32 pixels, which results in a distorted image.