The "for loop" for height takes in from "0" till the limit(height) and I can assume that the picture it reads in the limit, till "0".
But everything seems to be in placed and correct. I'm lost to what I can do to correct this "wrong".
QImage (and all other Qt objects with pixel-based coordinates) assign pixel (0, 0) to the upper left corner. Your map server apparently assumes that the (0, 0) map coordinate is in the lower left corner. This would make sense for a geographical map.
You can fix this by assigning your scan lines from the top down:
memcpy( mapImage->scanLine( height - i - 1 ), lineImage, width * 3 );
memcpy( mapImage->scanLine( height - i - 1 ), lineImage, width * 3 );
To copy to clipboard, switch view to plain text mode
------------------
If the original designers of the oscilloscope (and its descendent, the television) had designed it to draw the scan lines from the bottom up, instead of from the top down, we wouldn't have this (0,0) at the top left corner problem. (0,0) would be at the bottom right where it makes sense, and we wouldn't be faced with having to flip y coordinates for everything we draw. It wouldn't have been hard - all they would have had to do is change the polarity on the CRT deflection plates. See how decisions made nearly a century ago still haunt us?
Bookmarks