I have a QWebView that displays some HTML content, and I used CSS to style the text:
body { font-size: 10pt; }
The QWebView window also has a QTextEdit field, for which I set the font as follows:
QFont newFont; newfont.setPointSize(10); myEditField->setFont(newFont);
Unfortunately, the text displayed in QWebView is slightly larger than the text displayed in QTextEdit . I have a feeling that this is due to the fact that DPI settings are different in QWebView .

Is there a way to get the same font sizes displayed for both QWebView and QTextEdit ?
Thanks!
source share