mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
qt6
This commit is contained in:
parent
c2fc482d86
commit
7ed9c506d6
@ -41,7 +41,9 @@ class base:
|
|||||||
self.webview.bind(name, func)
|
self.webview.bind(name, func)
|
||||||
|
|
||||||
def measureH(self, font_family, font_size):
|
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)
|
fmetrics = QFontMetrics(font)
|
||||||
|
|
||||||
return fmetrics.height()
|
return fmetrics.height()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user