def setFont(self, font):
"""Sets the font to use in the hex editor.
:param font: Font to use.
:type font: QFont
"""
# Set font
super().setFont(font)
# Calculate font width and height
fm = QFontMetrics(font)
self.font_width = fm.width(" ")
self.font_height = int(fm.height()/2) - 1
# Recalc vars since font has changed
self._adjust()
self.viewport().update()
评论列表
文章目录