From 1d015e55f5e817df362928d3849713df2d6d00e3 Mon Sep 17 00:00:00 2001 From: David Meyer Date: Fri, 21 Nov 2025 16:54:35 -0500 Subject: [PATCH] Change deprecated `QFontMetrics.width` to `QFontMetrics.horizontalAdvance` --- labscript_utils/qtwidgets/headerview_with_widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labscript_utils/qtwidgets/headerview_with_widgets.py b/labscript_utils/qtwidgets/headerview_with_widgets.py index 89fdaef..a0e6672 100644 --- a/labscript_utils/qtwidgets/headerview_with_widgets.py +++ b/labscript_utils/qtwidgets/headerview_with_widgets.py @@ -122,7 +122,7 @@ def update_indents(self): font = item.font() fontmetrics = QtGui.QFontMetrics(font, self) indent = '' - while fontmetrics.width(indent) < desired_indent: + while fontmetrics.horizontalAdvance(indent) < desired_indent: indent += self.thinspace self.indents[widget] = indent font = self.font()