The code for processing very large images was "optimized" some time ago in Qt, and now, unfortunately, it does not work. I didn’t check the code, but my wild guess is that the “speed” or “displacement” texture used for drawing was before it was calculated in a floating point, and now it is calculated using a fixed point.
I don’t remember exactly which version it was introduced with, but it was pretty early after 4.0. We have one of our applications, which should allow us to place the cross with subpixel accuracy and scaling at a point when the scaling factor is high, you can notice that the image is "swinging".
I am the first who does not claim to have an error in the somone else code if I am not 100% sure, but this is one of those cases when I am really 100% sure.
The only way out is to draw the enlarged image manually, redefining the texture display code or (if you only need scaling factors int > 1
), drawing one pixel at a time with drawRect
... it should be fast enough on the PC.
Please note that the error may be a common error of video drivers, and not an error in Qt ... I saw that the problem with our software is present on different platforms (Windows / Linux / OsX) and is valid only for IIRC when using QWidget
( not when using QGLWidget
).
source share