When server resolution is 1366x768 and 8-bit depth is requested, this is what I get:
Looking at the code, it seems that once QImage is initialized from framebuffer data, the used ctor expects the buffer and each scanline to be 32-bit aligned: https://doc.qt.io/Qt-5/qimage.html#QImage-3. Providing the stride explicitly this is what I get: