This commit is contained in:
恍兮惚兮 2024-06-20 01:05:43 +08:00
parent c2fc482d86
commit 7ed9c506d6

View File

@ -41,7 +41,9 @@ class base:
self.webview.bind(name, func)
def measureH(self, font_family, font_size):
font = QFont(font_family, font_size)
font = QFont()
font.setFamily(font_family)
font.setPointSizeF(font_size)
fmetrics = QFontMetrics(font)
return fmetrics.height()