Create a QPainter and pass it the QImage object in its constructor. Then call the QPainter's drawText function to draw the text to the image.
So, assuming you've created your QImage object called img...
QPainter painter(img);
painter.drawText(xPos, yPos, text);
You can also set things on the QPainter like the font and brush that you want, to define what the text will look like.