I was trying to make some kind of help system for my application. QTextBrowser and a static HTML file seemed perfect for me. Only thing is that QTextBrowser is not reading alignment correctly – everything is aligned left.
My HTML file is one big borderless table with some rows aligned center, others left or right. I could post the whole file, but there is no point, here is the code for one row with one cell; other cells are just copy/paste.
<tr align="center">
<td><img src="10.png"></img></td>
</tr>
That image should be centered, but it’s not. Whole page looks good in both Chromium and Firefox, only QTextBrowser is giving me trouble.
The
QTextBrowserwidget only has support for limited subset of html/css.In this particular case, the
trtag has no support for thealignattribute, but thetdandthtags do (see the table cell attributes section for the complete list).