Gcode editor saving/loading problems

More
25 Sep 2021 17:47 - 25 Sep 2021 17:50 #221566 by bednarzmac
Hi, I have a problem with gcode editor widget. When i'm getting it in edit mode:
def EditButton(self): self.w.gcode_editor.editMode()

I can edit the code, make blank file, find phrases, undo and redo but I can't Save and open file via icons from Gcode editor.

Might be i need another library to get it work? Any suggestions?
Loading libraries:

import sys
import os
import linuxcnc
import hal from PyQt5
import QtCore, QtWidgets, QtGui from qtvcp.widgets.mdi_line
import MDILine as MDI_WIDGET from qtvcp.widgets.gcode_editor
import GcodeEditor as GCODE from qtvcp.widgets.stylesheeteditor
import StyleSheetEditor as SSE from qtvcp.lib.keybindings
import Keylookup from qtvcp.core
import Status, Action, Info
# Set up logging from qtvcp import logger LOG = logger.getLogger(__name__)
Last edit: 25 Sep 2021 17:50 by bednarzmac.

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

More
25 Sep 2021 18:47 #221569 by cmorley
Are you building a custom screen or using an existing screen?

By default it calls a file_dialog for loading and saving using special STATUS messages
This means you must have a filedialog that responds to the call.
The normal way to do this is to use the screen_options widget to set one up.

You can also 'class patch' the load and save function calls to do something else.
QtDragon for instance does this to trap those buttons.
The following user(s) said Thank You: bednarzmac

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

More
26 Sep 2021 09:21 #221621 by bednarzmac
Hi, i'm using highly modificated qttouchy (still working on it). Screen_options solution works like a charm!:) Thank You!

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

More
26 Sep 2021 18:01 #221655 by cmorley
Cool - I would love to see your work when finished - Touchy as is, is pretty ugly :)

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

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