Thank you very much, this is a really neat trick !
Would have taken me a year to figure this out.
I did embed binary data in the executable before, but I had never tried to use it instead of external files.
I did some experimenting. I converted all files to hexdumps and included them as unsigned char arrays. For the html file, I increased the size of the binary array by one and added a NULL (0x00) at the end so I can use the array name as a string with a type conversion from unsigned char* to char*.
Then I did the MimeFactory trick and It works just fine from the QTextBrowser.
The only problem is that QTextBrowser is not really good with HTML tags, some stuff gets skipped and for instance the width attribute of table cells is not recognized.
Also, I'm not sure how to deal with links, I have some bookmarks in this document (a contents section with links) but it doesn't work when clicked. I need to do some more reading to figure out how it should work.
But yes, your idea works and is really really useful! Thanks.