Type casting in Qt for Python 3.10
This commit is contained in:
@@ -1584,7 +1584,7 @@ class GUIFrame(QWidget):
|
||||
line.setValue(value)
|
||||
line.setAlignment(Qt.AlignRight) #required
|
||||
fm = QFontMetricsF(line.font())
|
||||
param_width = fm.maxWidth() * (len(str(max_val))) # + len(str(step)))
|
||||
param_width = fm.maxWidth() * (len(str(max_val)))
|
||||
line.setMaximumWidth(int(param_width))
|
||||
return line
|
||||
|
||||
@@ -1595,8 +1595,8 @@ class GUIFrame(QWidget):
|
||||
line.setObjectName("Write")
|
||||
value_for_width = max(value, key=len)
|
||||
fm = QFontMetricsF(line.font())
|
||||
param_width = fm.maxWidth() * (len(str(value_for_width)) * 0.5) # + len(str(step)))
|
||||
line.setFixedWidth(param_width)
|
||||
param_width = fm.maxWidth() * (len(str(value_for_width)) * 0.5)
|
||||
line.setFixedWidth(int(param_width))
|
||||
|
||||
return line
|
||||
|
||||
|
||||
Reference in New Issue
Block a user