Version: (using KDE 4.3.1) OS: Linux Installed from: Fedora RPMs Description of problem: When the Oxygen style is being used, transparent backgrounds for widgets are not handled correctly. Undesirable artefacts are shown and transparency is not always enforced. Sample code is attached and I'll also attach a screen shot shortly. Using any other style works as expected, so the problem seems to be restricted to the Oxygen style. I have had correspondence with Nokia on this issue and we agree that the Oxygen style appears to be the cause. Version-Release number of selected component (if applicable): The bug only shows up for Qt4.4.1 and later. When using Qt4.4.0 the bug does not seem to show up. How reproducible: See attached code sample and screen shot. Actual/expected results: The sample code should show a light green box with QLabel text drawn over it. The bug instead causes a dark green box to be drawn partly over the light green box and the label never appears. Other manifestations of the bug show a black box instead, but the general behavior seems to be that a darker box seems to cover approximately the upper half of the widget and transparency is mishandled.
Created attachment 36913 [details] Sample code to show the bug
Created attachment 36914 [details] Screenshot of the incorrectly rendered result
There are two issues here: 1/ the gradient, if shown, is not rendered properly. I believe this is because the alpha channel of the widget background color is not properly accounted for when calculating the gradients. This can probably be fixed for kde4.4 2/ there should not be any gradient here anyway. This one might be a Qt bug. The thing is that your widget is assigned a Qt::Window flag (which triggers the gradient painting) (Note: thanks Casper for the clue where to look), because it has no parent, even if it gets embedded into a graphicsScene. This is a Qt decision/bug/feature (I don't know). We can either - file a Qt bug - try make the triggering of background gradient rendering more strict to detect cases above (but that might then break other things) - let you add a parent to your widget :-) Comments welcome. Let me try fix 1/ first ...
ok. So item 1/ above is fixed (see attachment). For Item 2/ I'm not sure how to address.
Created attachment 37653 [details] Fixed background rendering when base color has alpha channel