We should probably have some html support in the mimetreeparser. Here are the following options:
Full blow Qt web engine
Issue: this doesn't work with mingw and is really big
Unfortunately Qt WebView on windows and Linux also use internally QtWebEngine and only uses the native browser on mac, ios and android.
Use a smaller web engine
- litehtml: there is an existing Qt wrapper for it called qlitehtml and used by QtCreator. No idea how well maintained it is
- servo: use rust which might or not be an issue. It is now again well maintained but not sure how embeddable it is and if we can limit network connectivity
- laddybird: also has qt integration but not sure how embeddable it is and if we can limit network connectivity
- webkit: Qt Webkit is dead but WPE WebKit is actively maintained but seems more targetted at yocto/embedded.
litehtml looks the most promising in term of amount of work we need to do from all these alternatives.
Use QTextDocument
Currently we use QTextDocument but only to render the plain text part, we could also render the html part too if we detect that it is not too complex with QTextDocument which should better preserve the formatting.
Open in external browser
We could add a button to open the html part in the browser if we detect that there is alternative html part