The first case: I want to draw a custom shadow with ranging alpha value on the sides of my window, while other parts staying opaque.

Ok, thanks, perhaps I'll try to search on how QA_TranslucentBackground is implemented in 4.5.x...