iHSV-Servo-Tool icon indicating copy to clipboard operation
iHSV-Servo-Tool copied to clipboard

Getting Errors when executing

Open vmisslbeck opened this issue 10 months ago • 2 comments

You can see on the screenshots, that i get this error: Screenshot 2024-04-06 154049 But when I change the 0.5 to 1 (here and the other line below) for example, I just get new errors Screenshot 2024-04-06 154109

so does anybody know what this is and how it can be solved?

vmisslbeck avatar Apr 06 '24 13:04 vmisslbeck

I got the exact same error. Anybody have a solution for that?

Simi779 avatar Apr 11 '24 16:04 Simi779

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:

chaotix- avatar May 23 '24 00:05 chaotix-