- Posts: 574
- Thank you received: 96
Error in tool_offsetview.py
- hottabich
- Offline
- Platinum Member
-
Less
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.
- hottabich
- Offline
- Platinum Member
-
Less
More
- Posts: 574
- Thank you received: 96
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!
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
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.
- hottabich
- Offline
- Platinum Member
-
Less
More
- Posts: 574
- Thank you received: 96
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!
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
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
- hottabich
- Offline
- Platinum Member
-
Less
More
- Posts: 574
- Thank you received: 96
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.
Moderators: cmorley
Time to create page: 0.323 seconds