This bug report originated from issue QTBUG-3326 <http://bugreports.qt.nokia.com/browse/QTBUG-3326> --- Description --- If the text in the HTML of a QWebView is formatted using a cascading style sheet to change the size, then the size of the text differs from what you get when using the same values to contruct a QFont and use this to render text in another Qt widget such as a QTextEdit.
Is this a specific Mac OS bug?
Confirmed in trunk. AFAIK webkit assumes 96dpi, could this be the issue?
Created attachment 50909 [details] Testcase I'm bored, so I made this testcase.
It's not Mac-specific, I see it on Linux.
The problem seems to be with the test case. QFont constructor assumes font size to be in terms of number of points. But the CSS part in the test case is setting the font-size in terms of number of pixels. That's why we are seeing the difference in displayed text size. So if we set the CSS font-size to be "40pt" or set the QFont size in terms of pixels explicitly, QFont fnt("Arial"); fnt.setPixelSize(40); then the displayed texts have the same size.
Closing this 2-year-old bug, the problem is with the test case.