We have a custom style that wants to provide a custom SH_Table_GridLineColor, but we found that the alpha channel of the returned color is ignored. We'd like a color that includes alpha to make it blend in a certain way with the underlying content in the item view.
To be fair, this seems implied by the documentation for the style hint, which describes it as:
The RGB value of the grid for a table.
... but it's not clear if the alpha channel is ignored by design.
The problem appears to be that QTableView::paintEvent() explicitly converts the returned value into a color as follows:
The implicit conversion from QRgb to QColor is documented to ignore the alpha channel (presumably for some historical reason).
Could this code instead use QColor::fromRgba() to preserve the color's alpha if the style wants to make use of it? If not, is there a specific reason why this behavior is undesirable, and could this be documented more clearly so that clients know what to expect?
Thanks in advance, and please let me know if we can provide any more information.