Gcode editor saving/loading problems

More
5 years 1 month ago #221566 by bednarzmac
Hi, I have a problem with gcode editor widget. When i'm getting it in edit mode:
Code:
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:

Code:
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__)

Please Log in to join the conversation.

More
5 years 1 month ago #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.

Please Log in to join the conversation.

More
5 years 1 month ago #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 to join the conversation.

More
5 years 1 month ago #221655 by cmorley
Cool - I would love to see your work when finished - Touchy as is, is pretty ugly :)

Please Log in to join the conversation.

Time to create page: 0.236 seconds
Powered by Kunena Forum