QtVCP Style Sheet Editor

More
7 years 7 months ago #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:
Code:
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:
Code:
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 to join the conversation.

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

More
7 years 7 months ago #129043 by phillc54
Replied by phillc54 on topic QtVCP Style Sheet Editor
When starting the screen.

Cheers, Phill.

Please Log in to join the conversation.

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

More
7 years 7 months ago #129047 by phillc54
Replied by phillc54 on topic QtVCP Style Sheet Editor
I get the following error popup:
Code:
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:
Code:
[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.

Please Log in to join the conversation.

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

More
7 years 7 months ago #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.

Please Log in to join the conversation.

Time to create page: 0.281 seconds
Powered by Kunena Forum