You coul load the Markedown into a QTextDocument, use toHTML to convert it to HTML, then apply the HTML to another QTextDocument, which you had previously set with a stylesheet of your making. This might not be as efficient as above, but it is undoubtedly less time-consuming and easier to maintain.