Table model colors

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

More
5 years 3 months ago #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:
Code:
self.w.tooloffsetview.highlight('red')
or
set the property with a QColor object :
Code:
self.w.tooloffsetview.setProperty('styleColorHighlight',QColor('red'))
or
set in designer or
set with stylesheet.
Code:
#tooloffsetview{ qproperty-styleColorSelection: orange; qproperty-styleColorHighlight: pink; } #offset_table{ qproperty-styleColorHighlight: pink; }

Chris

Please Log in to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum