Seems the \n doesn't work here? It is rendered as a glyph instead of treated as a new line. Maybe there is some QTextOption that can be used to change this.