I want to use QTAxis, is it meant to be used?

More
09 May 2024 05:32 #300197 by hachi
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.

More
09 May 2024 05:34 #300198 by cmorley
last arg is the screen/panel 's base name.

Please Log in or Create an account to join the conversation.

More
09 May 2024 05:36 #300199 by cmorley

So in testing my .ui file I've lost the gcode_editor object and the minimum size isn't being respected.
 

Yes I just tested it and see the same - not sure why though.
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.

More
09 May 2024 17:40 #300229 by hachi
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.

Please Log in or Create an account to join the conversation.

More
09 May 2024 22:56 #300251 by hachi
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.

Please Log in or Create an account to join the conversation.

More
09 May 2024 23:34 #300254 by hachi
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.

More
10 May 2024 00:05 #300259 by cmorley
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.
 

Please Log in or Create an account to join the conversation.

More
10 May 2024 00:55 #300261 by cmorley
Putting the geditor in a widget before QSplitting worked for me:
Attachments:

Please Log in or Create an account to join the conversation.

More
10 May 2024 03:52 #300284 by hachi
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.

More
10 May 2024 12:37 #300314 by cmorley
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)

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.094 seconds
Powered by Kunena Forum