QtVCP Style Sheet Editor

More
20 Mar 2019 05:30 #129040 by phillc54
I have declared a style sheet that exists in my config directory by the following in the initialized function of my handler file:
self.w.setStyleSheet(open('any_old_name.qss').read())
It works perfectly well.

I am attempting to use the Style Sheet Editor, so in the __init__ function of my handler file I have:
self.STYLEEDITOR = SSE(widgets,paths)
But it seems to require that the stylesheet has the same name as the UI file and be in a specific directory as I get the following error:

OSError: [Errno 2] No such file or directory: '/home/phill/git_imac/lcnc/share/qtvcp/screens/plasmac_ui'


Is there a way around this?

Cheers, Phill.

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

More
20 Mar 2019 06:24 #129042 by cmorley
Replied by cmorley on topic QtVCP Style Sheet Editor
Yes if you name the qss file the same as the ui file (but with the qss ending) and place it in the screen folder, it will load it automatically.

But it should be possible to load and save a qss file anywhere from the editor.
I will try to see whats going on...

Do you get the error on starting the screen or when starting the editor?

Chris M

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

More
20 Mar 2019 06:44 #129043 by phillc54
Replied by phillc54 on topic QtVCP Style Sheet Editor
When starting the screen.

Cheers, Phill.

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

More
20 Mar 2019 09:02 #129046 by cmorley
Replied by cmorley on topic QtVCP Style Sheet Editor
ok pushed some work on that - shouldn't error now.
Please let me know if there are other needed improvements for the editor.

Chris

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

More
20 Mar 2019 09:17 - 20 Mar 2019 09:30 #129047 by phillc54
Replied by phillc54 on topic QtVCP Style Sheet Editor
I get the following error popup:
Traceback (most recent call last):
  File "/home/phill/git_imac/lcnc/bin/qtvcp", line 434, in <module>
    APP = QTVCP()
  File "/home/phill/git_imac/lcnc/bin/qtvcp", line 353, in __init__
    window.apply_styles()
  File "/home/phill/git_imac/lcnc/lib/python/qtvcp/qt_makegui.py", line 123, in apply_styles
    if self.PATHS.QSS is not None:
AttributeError: Paths instance has no attribute 'QSS'
and the following in the terminal:
[Errno 2] No such file or directory: '/home/phill/git_imac/lcnc/share/qtvcp/screens/plasmac_ui'

That is with self.STYLEEDITOR = SSE(widgets,paths) either active or commented out in the __init__ function.

Cheers, Phill.

EDIT:
I reverted commit 6cdbc93 and I can run the screen with STYLEEDITOR commented out.
Last edit: 20 Mar 2019 09:30 by phillc54.

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

More
20 Mar 2019 18:08 #129088 by cmorley
Replied by cmorley on topic QtVCP Style Sheet Editor
did you make after pulling in the changes? i changed something in qtvcp that requires a remake.

Chris

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

More
20 Mar 2019 23:07 - 21 Mar 2019 00:16 #129122 by phillc54
Replied by phillc54 on topic QtVCP Style Sheet Editor
OOPS, that fixed it.
Thanks Chris.

Cheers, Phill.

EDIT:
There is a small typo in the title bar, H should be lower case.
It would be nice it it used the same save dialog as the gcode editor.
I like the way you can apply the style immediately, definitely a time saver.
Last edit: 21 Mar 2019 00:16 by phillc54.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum