I want to use QTAxis, is it meant to be used?
- hachi
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 3
09 May 2024 05:32 #300197
by hachi
Replied by hachi on topic I want to use QTAxis, is it meant to be used?
So in testing my .ui file I've lost the gcode_editor object and the minimum size isn't being respected.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7769
- Thank you received: 2053
09 May 2024 05:34 #300198
by cmorley
Replied by cmorley on topic I want to use QTAxis, is it meant to be used?
last arg is the screen/panel 's base name.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7769
- Thank you received: 2053
09 May 2024 05:36 #300199
by cmorley
When I preview it in designer it works right.
I'm calling it a night though.
Chris
Replied by cmorley on topic I want to use QTAxis, is it meant to be used?
Yes I just tested it and see the same - not sure why though.So in testing my .ui file I've lost the gcode_editor object and the minimum size isn't being respected.
When I preview it in designer it works right.
I'm calling it a night though.
Chris
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- hachi
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 3
09 May 2024 17:40 #300229
by hachi
Replied by hachi on topic I want to use QTAxis, is it meant to be used?
I tried throwing the gcode_editor into a frame and it made the splitter behave better, but where is geditor being defined as a ui element? I found the code but there is no widget ui file for it. Maybe that's part of the issue?
I was searching for the ui file so I could put some default text in it to show up in designer.
I was searching for the ui file so I could put some default text in it to show up in designer.
Please Log in or Create an account to join the conversation.
- hachi
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 3
09 May 2024 22:56 #300251
by hachi
Replied by hachi on topic I want to use QTAxis, is it meant to be used?
I haven't figured it out.
I went searching for references by name to widgets in handler files and I don't see any that are referencing the parent containers of gcode_editor that matter, only other widgets
I did notice that in the qtaxis handler there is a reference to widget named 'frame' and that is the machine controls frame... it hides that if you try to enter editing mode. I did test and see that you get an exception thrown if you try to address a widget that doesn't exist, so that implies that we aren't failing because some widget is missing or changed, I think?
Entering and exiting edit mode does move the widgets around like I would expect, but gcode_editor is still missing in both cases.
I also tried reducing the changes to only be the horizontal splitter only... the resulting interface "vibrates" the right tab object and I don't know why. If you want to see that I pushed it as hachi/qtaxis-horizontal-only-splitter
I could imagine that the vibrating preview window is similar to the gcode_editor not rendering, as both of these are custom widgets, but I have no insight yet.
I went searching for references by name to widgets in handler files and I don't see any that are referencing the parent containers of gcode_editor that matter, only other widgets
I did notice that in the qtaxis handler there is a reference to widget named 'frame' and that is the machine controls frame... it hides that if you try to enter editing mode. I did test and see that you get an exception thrown if you try to address a widget that doesn't exist, so that implies that we aren't failing because some widget is missing or changed, I think?
Entering and exiting edit mode does move the widgets around like I would expect, but gcode_editor is still missing in both cases.
I also tried reducing the changes to only be the horizontal splitter only... the resulting interface "vibrates" the right tab object and I don't know why. If you want to see that I pushed it as hachi/qtaxis-horizontal-only-splitter
I could imagine that the vibrating preview window is similar to the gcode_editor not rendering, as both of these are custom widgets, but I have no insight yet.
Please Log in or Create an account to join the conversation.
- hachi
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 3
09 May 2024 23:34 #300254
by hachi
Replied by hachi on topic I want to use QTAxis, is it meant to be used?
I threw a frame around both the right tab and the gcode_editor and now it's working. I have no clue why. PR soon.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7769
- Thank you received: 2053
10 May 2024 00:05 #300259
by cmorley
Replied by cmorley on topic I want to use QTAxis, is it meant to be used?
geditor:
github.com/LinuxCNC/linuxcnc/blob/2.9/li...p/widgets/geditor.py
which uses:
gcode_editor
github.com/LinuxCNC/linuxcnc/blob/2.9/li...gets/gcode_editor.py
I think I know what the problem is. GEditor is a bit of a hack job - it uses a mainWindow object which is unusual.
This is to get the tool bar in editoir mode. I bet that is messing with the qsplitter.
github.com/LinuxCNC/linuxcnc/blob/2.9/li...p/widgets/geditor.py
which uses:
gcode_editor
github.com/LinuxCNC/linuxcnc/blob/2.9/li...gets/gcode_editor.py
I think I know what the problem is. GEditor is a bit of a hack job - it uses a mainWindow object which is unusual.
This is to get the tool bar in editoir mode. I bet that is messing with the qsplitter.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7769
- Thank you received: 2053
10 May 2024 00:55 #300261
by cmorley
Replied by cmorley on topic I want to use QTAxis, is it meant to be used?
Putting the geditor in a widget before QSplitting worked for me:
Please Log in or Create an account to join the conversation.
- hachi
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 3
10 May 2024 03:52 #300284
by hachi
Replied by hachi on topic I want to use QTAxis, is it meant to be used?
Is there a technical reason why we can't open gcode before the machine is enabled?
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7769
- Thank you received: 2053
10 May 2024 12:37 #300314
by cmorley
Replied by cmorley on topic I want to use QTAxis, is it meant to be used?
No.
In qtvcp/lib/toolbar_action around line 86 - change to:
elif action == 'load':
#STATUS.connect('state-off', lambda w: widget.setEnabled(False))
#STATUS.connect('state-estop', lambda w: widget.setEnabled(False))
STATUS.connect('interp-idle', lambda w: widget.setEnabled(True))
STATUS.connect('interp-run', lambda w: widget.setEnabled(False))
#STATUS.connect('all-homed', lambda w: widget.setChecked(True))
function = (self.actOnLoad)
In qtvcp/lib/toolbar_action around line 86 - change to:
elif action == 'load':
#STATUS.connect('state-off', lambda w: widget.setEnabled(False))
#STATUS.connect('state-estop', lambda w: widget.setEnabled(False))
STATUS.connect('interp-idle', lambda w: widget.setEnabled(True))
STATUS.connect('interp-run', lambda w: widget.setEnabled(False))
#STATUS.connect('all-homed', lambda w: widget.setChecked(True))
function = (self.actOnLoad)
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.083 seconds