iHSV-Servo-Tool
iHSV-Servo-Tool copied to clipboard
Getting Errors when executing
You can see on the screenshots, that i get this error:
But when I change the 0.5 to 1 (here and the other line below) for example, I just get new errors
so does anybody know what this is and how it can be solved?
I got the exact same error. Anybody have a solution for that?
Yes. I got it working with the following four changes:
diff --git a/iHSV-Servo-Tool.py b/iHSV-Servo-Tool.py
index c5abf37..faf3597 100755
--- a/iHSV-Servo-Tool.py
+++ b/iHSV-Servo-Tool.py
@@ -58,11 +58,11 @@ class ModBusDataCurveItem(pg.PlotCurveItem):
layout.setColumnMinimumWidth(0, 30)
layout.addWidget(self.label, 0, 1, 1, 2)
layout.setColumnMinimumWidth(1, 150)
- layout.setColumnStretch(1, 0.5)
+ layout.setColumnStretch(2, 1)
layout.addWidget(self.activeCheckbox, 0, 2)
layout.addWidget(self.axisCheckbox, 1, 2)
layout.setColumnMinimumWidth(2, 50)
- layout.setColumnStretch(2, 0.5)
+ layout.setColumnStretch(4, 1)
self.readSettings()
@@ -278,9 +278,9 @@ class MainWindow(QMainWindow):
for col_nbr, col_name in enumerate(header):
if col_name == 'Description':
- self.ParamTable.horizontalHeader().setResizeMode(col_nbr, QHeaderView.Stretch)
+ self.ParamTable.horizontalHeader().setSectionResizeMode(col_nbr, QHeaderView.Stretch)
else:
- self.ParamTable.horizontalHeader().setResizeMode(col_nbr, QHeaderView.ResizeToContents)
+ self.ParamTable.horizontalHeader().setSectionResizeMode(col_nbr, QHeaderView.ResizeToContents)
def attachCurve(self, curve):
try: