Table style

Find and share HowTos to various installations / configurations!
17 posts • Page 2 of 2
AGorbatykh
Posts:59
Joined: Thu Dec 17, 2015 1:01 pm

Re: Table style

Post by AGorbatykh »

And what about TREE-widget? What's his name (TreeQT and QTree doens't work)?

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Table style

Post by mkoller »

It is TreeWidgetQT or better use its baseclass QTreeView.

BTW: all classnames are documented in qthelp://wincc_oa/doc/Native_GEDI/Referenz_Native_GEDI-64.htm

AGorbatykh
Posts:59
Joined: Thu Dec 17, 2015 1:01 pm

Re: Table style

Post by AGorbatykh »

Thank you

michel.eijgermans
Posts:46
Joined: Mon Aug 08, 2011 11:50 am

Re: Table style

Post by michel.eijgermans »

Styling a Tableview gridline-color works like described in previous posts

QTableView {
gridline-color: rgba(254, 254, 254, 255);
}

But it seems to be that the color white or rgba(255, 255, 255, 255) is not accepted.
To avoid this i applied an 'almost' white color which works perfectly fine.

Is this by design, or am i'm facing a minor bug here?

schneebergera
Posts:89
Joined: Sun Apr 03, 2016 5:52 pm

Re: Table style

Post by schneebergera »

Hello,

definition: gridline-color
e.g. { gridline-color: gray }
... the color of the grid line in a QTableView.

RGBA ... red green blue alpha.
RGBA color values are an extension of RGB color values with an alpha channel -
which specifies the opacity for a color.

An RGBA color value is specified with:
rgba(red, green, blue, alpha).
The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).

try to set the color like this ...
e.g.
QTableView
{
gridline-color: rgba(255,255,255,0.0);
}

best regards,
Andreas

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Table style

Post by mkoller »

I just analyzed this weird issue and found the problem (you can call it bug ;-) )
Internally there is a check for: when the style returns -1 for the grid color, then use a default color.
Sadly, rgb(255,255,255) (the alpha value is always set to 255), is represented as 32 set bits, which is equal to a signed -1 value ...
The check for -1 seems some old cruft, which I see as no longer needed, so I will remove it so white should also work in next WinCC_OA versions

michel.eijgermans
Posts:46
Joined: Mon Aug 08, 2011 11:50 am

Re: Table style

Post by michel.eijgermans »

Thanks, using alpha parameter as 0.0 to 1.0 works much better.. :)

17 posts • Page 2 of 2