Table model colors

14 Jul 2021 01:23 #214663 by persei8
Table model colors was created by persei8
The current tool and offset tables have highlight and selected colors that do not play nice with my current stylesheet. I modified the code so I could set the highlight and selected colors from the handler.
def highlight(self, color):
    self.tablemodel._highlightcolor = QColor(color)

def selected(self, color):
    self.tablemodel._selectedcolor = QColor(color)
It could also be a designer parameter (thus no handler code mods), if you decide to incorporate this change,
Thank you.

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

14 Jul 2021 03:13 #214670 by cmorley
Replied by cmorley on topic Table model colors
Thanks Jim.

I added your functions and added the properties too.
I also did the same for originoffsetview.

so you can call the functions with a color string:
set the property with a QColor object :
set in designer or
set with stylesheet.
qproperty-styleColorSelection: orange;
qproperty-styleColorHighlight: pink;

qproperty-styleColorHighlight: pink;

The following user(s) said Thank You: persei8

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

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