I need to display a formatted text. The text is a plain text with custom markups. I need to parse the tags and display the formatted text in a window. The text will be read-only. I need to process tags like these:
- new line (not a new paragraph, just a new line within a paragraph)
- new paragraph (with and without paragraph indent)
- indented text
- coloring, italic, bold
- simple tables (bullets, "text bullets", that means, the "bullet" is a "heading" which can differ from bullet to bullet while keeping the corresponding texts equally indented). No decorations in the tables, just keep "columns".
- fixed pitch font
- detect a clicked URL, pass URL to the default web browser.
and similar simple formatting tags. The tags can be nested like this:
:color red.some red text :italic.also in italics:end of italic. continuing red text.:end of color.
I have checked the related classes in Qt and I got lost immediately. Where should I begin? What should I read or see? What widget should I select for the text window? I have QPlainTextEdit as a placeholder right now. I can display the raw text nicely but this is not what I want.
Bookmarks