Just a couple of thoughts:
Did you try setting the QPainter::TextAntialiasing render hint?
Also, sometimes when using HDPI (high res screen), the reported window width & height are not actual pixels; you can check this with devicePixelRatio() and use the value to scale the size of your pixmap.