Error in tool_offsetview.py

More
4 years 3 months ago #246825 by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
Thank you very much for your attention and help! Here is my version of qtdragon, you may be interested.
Attachments:
More
4 years 3 months ago #247235 by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
Switching the tool with the command M61 or Reload Tool changes the image of the tool, but not through the dialog. Who knows how to fix it please tell me. Thank you!
Attachments:
More
4 years 3 months ago #247273 by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
use the STATUS message 'tool-in-spindle-changed' to call a function, to change the image.
More
4 years 3 months ago #247307 by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
Sorry, but I don't understand how to implement this. Thank you!
More
4 years 3 months ago #247351 by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
In the handler file something like this:
Code:
        STATUS.connect('tool-in-spindle-changed', lambda w, t: self.update_tool_image(t))
Code:
def update_tool_image(self, toolnumber):      command1 = "[{}]".format(toolnumber)      self.w.lbl_tool_image.setPixmap(QtGui.QPixmap(":/images/images/" + str(command1) + ".png"))
The following user(s) said Thank You: hottabich
More
4 years 3 months ago #247459 by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
Thank you so much! Works great. I spread the handler with changes for my previous files.
Attachments:
Moderators: cmorley
Time to create page: 0.323 seconds
Powered by Kunena Forum